M2M access tokens are JWTs signed with the project’s JSON Web Keys, and can be validated locally using any Stytch client library.
You may pass in an optional set of scopes that the JWT must contain in order to enforce permissions.
This method is only available via our backend SDKs.
Body
The access token granted to the client. Access tokens are JWTs signed with the project’s JWKS.
The set of scopes this token is expected to contain. If the token is missing any of the scopes passed in, an error is returned.
The maximum allowed age of the JWT. M2M tokens are valid for one hour by default, but you can require a more-recent JWT on sensitive routes.
The clock tolerance to use during token verification. This can help with clock drift issues.
Response
The ID of the M2M Client the token was issued to.
The complete set of scopes contained within the access token.
Any additional custom claims that were found within the JWT. Custom claims can be generated from an M2M Client’s metadata by using a JWT Template configured in the Dashboard.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
may ask for this value to help identify a specific API call when helping you debug an issue.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.