Skip to main content
Package: com.coinbase.cdp.auth
Generates JWT tokens for authenticating with Coinbase APIs. Supports both EC (ES256) and Ed25519 (EdDSA) keys. The key type is automatically detected based on the key format. Example usage:

Method Details

generateJwt

Generates a JWT (Bearer token) for authenticating with Coinbase’s REST APIs. Parameters: options (JwtOptions) - the JWT configuration options Returns: String - the generated JWT string Throws: [JwtGenerationException](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/auth/exceptions/JwtGenerationException "class in com.coinbase.cdp.auth.exceptions") - if token generation fails