post
https://oauth.fanscore.com/oauth/token
This endpoint supports several key functions:
- Registration (
grant_type=register) - Login (
grant_type=password) - Login anonymously (
grant_type=anonymous) - Refresh access token (
grant_type=refresh_token)
The behaviour depends on the grant_type field. The full list of supported values are:
| grant_type | Description |
|---|---|
register | Register a new standard account and receive tokens |
register_minor | Register a junior/minor account (requires guardian email) |
password | Resource Owner Password Credentials |
refresh_token | Exchange a refresh token for a new access token |
anonymous | Login anonymously - this creates an anonymous SSO account |
authorization_code | Exchange an authorisation code (PKCE supported) |
mfa_otp | Complete MFA with a TOTP/OTP code |
mfa_oob | Complete MFA with an out-of-band code |
mfa_recovery_codes | Complete MFA with a recovery code |
When MFA is required, the server responds with HTTP 401 and a body containing mfa_token and an mfa object instead of normal tokens.
Request Body Parameter Examples
Registration
client_id=CORTEX
[email protected]
password=password
deviceId=6df1c5ca-09d8-4ab7-9649-0c8ca56ffca8Registration (minor/junior)
grant_type=register_minor
client_id=CORTEX
[email protected]
password=password
deviceId=b613d51b-d136-42c3-b8d0-09b7dd03b5d3
first_name=John
last_name=Doe
Login
grant_type=password
client_id=CORTEX
[email protected]
password=password
deviceId=3d0bb8c3-065a-4396-9031-a8dec5fcaf42
Login (anonymous)
grant_type=anonymous
client_id=CORTEX
deviceId=b5e1ca16-b9ee-4ea1-a522-fb436e4cfddc
Refresh Token
Retreive a new access token when the current one expires. It requires the use of a valid refresh token.
grant_type=refresh_token
client_id=CORTEX
refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZW1vLXVzZXIiLCJuYW1lIjoiSmFuZSBEb2UiLCJpc3MiOiJodHRwczovL2V4YW1wbGUuY29tIiwiYXVkIjoiZGVtby1hcHAiLCJpYXQiOjE3OTIwNzE3NjAsIm5iZiI6MTc5MjA3MTc2MCwiZXhwIjoxNzkyMDc1MzYwfQ.nYlwd1kP9NmN56cXZdsoVdJJ0bk3AlAb9VanI_sPBS0
deviceId=e0b46507-1356-427c-b9a1-01e45e541e76Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
