Refresh token

To refresh your token and obtain a new one, you can make a request to the token refresh endpoint with your current token.

Endpoint

POST /account/refresh_token/

CURL example


curl -X POST https://betmatic.app/api/account/refresh_token/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Token {token}'

Parameters

Name
In
Type
Required
Description

data

body

RefreshAuthToken

true

none

RefreshAuthToken

Name
Type
Required
Description

token

string

true

none

Body parameter example

{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImphY29ibWEucmFjaW5nYmJAZ21haWwuY29tIiwiaWF0IjoxNjM4NzQxODY0LCJleHAiOjE2Mzg5MTQ2NjQsImp0aSI6IjYxZGFkYzk1LWM3NWMtNDQwZi1hYWJhLTgwYmU5NjdmYjEzYyIsInVzZXJfaWQiOjIsIm9yaWdfaWF0IjoxNjM4NzQxODY0fQ.MFUjj1oaINr0v9xwb2ZGjVUPCL3o-4_RgRefh1T708o"
}

Responses

Status
Meaning
Description
Schema

200 Response example

{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImphY29ibWEucmFjaW5nYmJAZ21haWwuY29tIiwiaWF0IjoxNjM4NzQyMDkyLCJleHAiOjE2Mzg5MTQ4OTIsImp0aSI6ImM0MDRkYmQ3LThjYmItNDYwNy04MzJhLTA2MWNlMTRjYzE3YSIsInVzZXJfaWQiOjIsIm9yaWdfaWF0IjoxNjM4NzQxODY0LCJvcmlnX2p0aSI6IjYxZGFkYzk1LWM3NWMtNDQwZi1hYWJhLTgwYmU5NjdmYjEzYyJ9.dGCdXf_VtQYUCaSz5JYaQtwxwCWoC_Wc8x1pweaHGwE"
}

If the request is successful and the current token is valid, you will receive a response containing a new token with an updated expiration time. You should use this new token for future API calls.

Last updated