Refresh Token Based Access Token

From docs
Jump to: navigation, search

Mobile_API »Get Access Token

Base URL

https://apimobile.callproof.com

Endpoint

/api/access-token

Purpose

Issues a new access token (and refresh token) using a valid refresh token. This endpoint is used when the current access token has expired and the client needs to renew authentication without logging in again.

HTTP Method

POST

Headers

Header Required Description
Authorization No Not required for this endpoint

Security

  • No Bearer token required – Authenticated via a valid refresh_token in the request body.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
refresh_token string Yes Valid refresh token used to request a new access token
access_token string No Current/expired access token (optional; used for logging/context when provided)

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/access-token' \ --header 'Content-Type: application/json' \ --data '{ "refresh_token": "YOUR_REFRESH_TOKEN", "access_token": "" }' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/access-token' \ --header 'Content-Type: application/json' \ --data '{ "refresh_token": "YOUR_REFRESH_TOKEN", "access_token": "" }' 

Successful Response (200)

Returns a new OAuth token pair from the token service.

Field Type Description
token_type string Token type (typically Bearer)
expires_in integer Access token lifetime in seconds
access_token string Newly issued access token
refresh_token string Newly issued refresh token

Error Responses

Status Code Meaning
200 Validation or refresh failed – response body uses clientStatusCode 401 with an error message
  • Validation (HTTP 200, clientStatusCode 401) – Missing refresh_token.
  • Invalid refresh token (HTTP 200, clientStatusCode 401) – Refresh failed (for example, "Given Refresh Token is Invalid" with related user/token context when available).