curl --request POST \
--url https://api.cal.com/v2/oauth/{clientId}/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-cal-secret-key: <x-cal-secret-key>' \
--data '
{
"refreshToken": "<string>"
}
'{
"status": "success",
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"accessTokenExpiresAt": 123,
"refreshTokenExpiresAt": 123
}
}calAccessToken and calRefreshToken fields.
Response also contains accessTokenExpiresAt and refreshTokenExpiresAt fields, but if you decode the jwt token the payload will contain clientId (OAuth client ID), ownerId (user to whom token belongs ID), iat (issued at time) and expiresAt (when does the token expire) fields.curl --request POST \
--url https://api.cal.com/v2/oauth/{clientId}/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-cal-secret-key: <x-cal-secret-key>' \
--data '
{
"refreshToken": "<string>"
}
'{
"status": "success",
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"accessTokenExpiresAt": 123,
"refreshTokenExpiresAt": 123
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
OAuth client secret key.
Managed user's refresh token.
Was this page helpful?