Sign JWT with RSA

Authenticate a machine-to-machine connection with token exchange by signing a JWT token with a private RSA key in PEM format. OAuth2 credentials must be used to exchange the JWT token.

SignJWTWithRSA: function

How it works

  • The JWT token is signed with the user ID and customer ID specified in the token payload. A valid private RSA key in PEM format is required for this step. The public key must be configured in the third-party system.
  • The JWT token is exchanged along with the client ID and client secret of the OAuth2 application to create an access token (session ID).
  • The session ID is cached and reused for subsequent API calls.

When the cached access token is invalid or expired, the refresh token is used to create a new session ID.