Authentication

Refresh Token

This endpoint is used to refresh the access token by providing the refresh token in the request body.

The refreshToken expires in 24 hour.

Request Body

  • refreshToken (string, required): The refresh token used to obtain a new access token.

Response

  • status (string): Indicates the status of the request, where "success" means the request was successful.
  • data (object): Contains the new access token and refresh token.
  • accessToken (string): The new access token.
  • refreshToken (string): The new refresh token.

Request rules. You must send refreshToken in the body unless the request already carries Speak's refresh token session cookie, which only browser clients signed in through Speak's own web apps have. The server reads the body value first and falls back to that cookie, so an API integration that omits the field always gets a 404. This endpoint is rate limited to 5 requests per minute per IP address.

post/auth/refreshToken

Request

  • Base URL: https://api.speakai.co/v1
  • URL: https://api.speakai.co/v1/auth/refreshToken
  • Auth: API key in header x-speakai-key and API key in header x-access-token

Request body

refreshTokenstring

The refresh token you received the last time you signed in or requested a token. Send it here to get back a new access token and a new refresh token. Refresh tokens are single use: once you exchange one, the old value stops working, so store the new one from the response and use that next time. Replaying an already used refresh token ends the whole session and forces a fresh sign in. A missing token, or one that does not match an active session, returns 404. A token that is expired, tampered with, or otherwise not valid returns 401. Must be a string. An empty value or a value that is not a string is treated as missing and returns 404. Sending a non-string value also cancels the cookie fallback, so send either a real token string or no field at all. Required for API callers, since the only alternative the server accepts is a browser session cookie.

Response

OK

statusstring

Changes

No recorded changes to this operation across all 2 revisions of this API.