Skip to the content
  1. API reference
  2. Connect your users

Force a token refresh

POST/public/integrations/refreshAuthToken
Core + Managed TransfersAuthBasicTokenDevTokenDocsSession

Refreshes the music-service tokens of one connected user now. With Client Secret authentication the answer holds the new authData.

Request body

application/json · required

integrationUserUUID
uuid
required

Response

200application/json · RefreshedIntegrationUserResponseOK
integrationUser
IntegrationUserWithAuthData
required
integrationUser.uuid
uuid
requiredThe integrationUserUUID. Use it in every /api/{integrationUserUUID}/... call.
integrationUser.integrationUserId
string
requiredThe user's id on the music service.
integrationUser.name
string | null
required
integrationUser.email
string | null
required
integrationUser.imageUrl
string | null
required
integrationUser.country
string | null
requiredISO 3166-1 alpha-2 country of the account, when the service tells us.
integrationUser.authData
object
The raw music-service credentials, without the refresh token. Only in answers to a Client Secret (Basic) or one-time-token call.
integrationUser.authDataExpiresAt
number | null
When authData expires, in milliseconds since the epoch.
Example answer
{
  "integrationUser": {
    "uuid": "3f0b8c1e-6a4d-4c7a-9a55-2f1e7d9b0c11",
    "integrationUserId": "mica.nowak",
    "name": "Mica Nowak",
    "email": "[email protected]",
    "imageUrl": "https://images.example.com/mica.jpg",
    "country": "PL",
    "authData": {},
    "authDataExpiresAt": 0
  }
}

Errors

401

The refresh failed. Send the user to sign in again.

404

Your account has no connected user with this uuid.