Overview
This tutorial shows you how to authenticate to the Issuing API using Java by generating signed JSON Web Tokens (JWTs).In This Recipe
- Add Dependencies
- Create AccessTokenSigner
- Usage - GET Request
- Usage - POST Request
Prerequisites
- Java 8 or higher
- Your Issuing API credentials (Access Key and RSA key pair)
- Maven or Gradle for dependency management
Step 1: Add Dependencies
Add these dependencies to yourpom.xml:
Step 2: Create AccessTokenSigner
Create a utility class to handle JWT signing with SHA256 body hashing:Important Notes:
- Request body is hashed with SHA256 before signing
- 30 second expiration for security
- Private key format: Base64-encoded PKCS8, no PEM headers/footers
- Empty body: Use empty string
""for GET requests
Step 3: Usage - GET Request
Make a simple GET request to test connectivity:This example shows JWT generation only. Use your preferred HTTP client (Apache HttpClient, OkHttp, Spring RestTemplate, etc.) to make the actual API request with the
authorizationHeader.Step 4: Usage - POST Request
Make a POST request with a request body:Common Pitfalls
Next Steps
- See Authentication for more details on JWT signing
- Explore API Endpoints to see what you can do
- Check out Request Signing for security best practices

