Build and sign the JWT client assertion you need before you request an OAuth access token.
The next step is to generate your client assertion.Sign the token in your own application code with any library that supports RS256. Step 3 below includes an example.For quick sandbox testing only, you can use an online JWT tool such as Dinochiesa JWT.
Never paste a production private key into a website. Anyone who obtains your private key can request tokens for your institution.
Company Url: Your company URL.OAuth Institution Client ID: The client ID you copied from your Cardcore dashboard.Cardcore Environment: This is https://card-core-api.sudoafrica.site for production and https://card-core-api-sandbox.sudoafrica.site for sandbox.Issued At: This is the timestamp of the date you create the client assertion JWT. You can generate a timestamp using Epoch Converter.Expiry: This is the timestamp of the date you want the client assertion JWT to expire.Note: iat and exp must be numbers (Unix timestamps in seconds), not strings. For example: 1639806203.
Sign the header and payload with RS256 by using the private key you generated when you created your app. The signed output is your client assertion.This Node.js example uses only the built-in crypto module: