Exchange a refresh token for an access token for a Connected App client.
refresh_token grant type is used to periodically exchange a refresh token for a new access token without user interaction. When using the refresh_token grant type, a refresh_token must be provided.
This endpoint returns different responses depending on the client being used:
refresh_token will be present in the response. You must save this new token for next time. Each refresh token has an expiry of 3 months from issuance.refresh_token will be present in the response. The refresh token has an initial expiry of 3 months, and each use extends its lifetime by another 3 months.access_token_expiry_minutes field, which defaults to one hour.
You can validate and examine your access and refresh tokens by using the Token Introspection Endpoint.
Access token JWTs can be validated locally by using a Stytch Backend SDK, or any library that supports the JWT protocol.
project_id and project_secret pair. Instead, it is authenticated via the client_id and client_secret of an active Connected App Client within the current project.client_id and client_secret within the request body as well as within a HTTP-Basic Auth header.application/json and application/x-www-form-urlencoded content types.https://test.stytch.com/v1/public/${projectId}/oauth2/token.authorization_code or refresh_token is supported for Connected App clients. An error will be returned if this parameter is omitted.refresh_token grant.offline_access scope is granted.