Access token refresh
POST
/v2/auth/refresh
const url = 'https://api-admin.billz.ai/v2/auth/refresh';const options = { method: 'POST', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', 'Content-Type': 'application/json' }, body: '{"refresh_token":"REFRESH_TOKEN"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-admin.billz.ai/v2/auth/refresh \ --header 'Content-Type: application/json' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \ --data '{ "refresh_token": "REFRESH_TOKEN" }'Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”platform-id
string
Platform identifier. A static value is used for integrations.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
refresh_token
required
One-time refresh token. Empty — 400 invalid_request. Limited in length
string
Example
{ "refresh_token": "REFRESH_TOKEN"}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
200 on success
integer format: int32
message
‘ok’ on success; on error — a human-readable description
string
error
Null on success; on error — a string RFC 6749 §5.2 code
integer format: int32
data
object
token_type
Always Bearer
string
access_token
New access token
string
refresh_token
New refresh token; absent if not issued
string
expires_in
Access token lifetime in seconds
integer format: int32
refresh_expires_in
Refresh token lifetime in seconds; absent if not set
integer format: int32
Examplegenerated
{ "code": 1, "message": "example", "error": 1, "data": { "token_type": "example", "access_token": "example", "refresh_token": "example", "expires_in": 1, "refresh_expires_in": 1 }}