Wonder
post/api/v1/biz/token/refresh

Refresh a token

Use the refresh_token to obtain a new access token (user_grant scope). Note:

  1. The refresh_token is not rotated and can be reused until it expires.
  2. The previous access token will be immediately blacklisted and invalidated.

Header parameters

Authorizationrequired
string

HTTP Basic Auth credentials: `Basic base64(client_id:client_secret)`, where `client_id` is the username and `client_secret` is the password

Example: Basic base64(client_id:client_secret)

x-request-id
string

Example: {{$string.uuid}}

Content-typerequired
string

Example: application/json

Request body · application/json

business_id
string<uuid>

Optional target business. Omit it to keep using the authorized business

refresh_tokenrequired
string

Refresh token obtained when the login succeeded

Responses

New access token issued.

expires_inrequired
integer

Token lifetime in seconds

token_typerequired
enum<string>

Fixed as 'Bearer'

Bearer

access_tokenrequired
string

The new `user_grant` JWT

refresh_tokenrequired
string

The same refresh token (not rotated)

token_expired_atrequired
string<date-time>

Expiration time of the new access token

refresh_token_expired_at
string<date-time> | null

Expiration time of the refresh token. `null` means it never expires