Skip to content

Token API

Create token

URL

POST <api_url_profile>/anonymous/token/create

Headers

Content-Type: application/json

Authorization: <id_token>

Body

{
    "fan_application_sub": "<fan_application_sub>",
    "token_text": "<token_text>"
}

Response 200: OK

{
    "status": 200,
    "hash": "<token_hash>"
}

Get token

URL

POST <api_url>/p/anonymous/token/get

Headers

Content-Type: application/json

Body

{
    "fan_application_sub": "<fan_application_sub>",
    "hash": "<token_hash>"
}

Response 200: OK

{
    "status": 200,
    "token_text": "<token_text>"
}

Refresh User token

URL

POST <api_url>/p/user/token/refresh

Headers

Content-Type: application/json

Body

{
    "refresh_token": "<refresh_token>"
}

Response 200: OK

{
    "status": 201,
    "id_token": "eyJraWQiOiJrSW5qaFRUV3Q0RUhNVXZlWn...XnQ",
    "token": "eyJraWQiOiI1WmNHZsOGNnYW5vNzE1WWVdO...x5mg"
}

Get application user sub for logged-in users

URL

POST <api_url>/p/user/reporter/application-user-sub

Headers

Content-Type: application/json

Authorization: <id_token>

Body

{
    "fan_application_sub": "<fan_application_sub>"
}

Response

{
    "status": 200,
    "fan_sub": "<fan_sub>",
    "application_user_sub": "<application_user_sub>"
}