Skip to content

Refresh Auth Token

When you initially receive a token it will have an expiration time which in some cases may be inconvenient if you are performing long time span actions. In that case an endpoint to programmatically refresh your token is available.

Request

Endpoint: https://youcanpay.com/api/refreshMethod: POST

bash
$ curl --location --request POST 'https://youcanpay.com/api/refresh' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_TOKEN_eyJpc3...'

Response

json
{
    "token": "YOUR_TOKEN_eyJpc3MiOiJodHRwOlwvXC9wYXkuZG90c2hvcC5jb21cL2....",
    "expires_in": 3600
}