Skip to main content

Authentication

Two things have to be in place before your first authenticated call, and the API returns a 403 even with correct code if either is missing:
  1. Rise has to enable your company for B2B API access in the environment you’re calling. Staging and production are enabled separately, so a request for one does not carry to the other.
  2. The wallet you authenticate with has to hold an authorized role (Owner, Payer, or Treasurer) on your RiseID.
Both are walked through in Getting API Access. Set them up there first, then come back here for the handshake itself.
Rise implements a dual authentication system to ensure maximum security for your integrations. JWT tokens provide session management for all API operations, while SIWE (Sign-In with Ethereum) is required to obtain JWT tokens and adds blockchain-based verification for sensitive transactions. The Rise SDK simplifies this process by handling both authentication layers automatically.

SIWE Authentication

Use your wallet and private key for automatic authentication

JWT Authentication

Use a pre-generated JWT token for direct API access

Authentication Layers

Rise’s dual authentication system consists of two complementary layers:

JWT Authentication Layer

  • Session management: Provides secure session management for all API operations
  • User identity: Verifies user identity and permissions
  • Access control: Handles API access control and rate limiting
  • Token-based: Uses JWT tokens for secure communication

SIWE Authentication Layer

  • JWT token generation: Required to obtain JWT tokens for API access
  • Blockchain verification: Uses cryptographic wallet signing for authentication
  • Enhanced security: Provides additional security for sensitive operations
  • Wallet-based: Uses your wallet credentials for comprehensive access
  • Immutable proof: Creates immutable proof of user intent and authorization
  • Write operations: Required for the majority of write operations in Rise

API Authentication Requirements

Different API endpoints require different levels of authentication:

JWT Authentication (Read Operations)

  • User profile information (/me)
  • Company information (/companies)
  • Team management (/teams)
  • Balance queries (/entity-balance)
  • Transaction history (/transactions)
Note: JWT tokens are obtained through SIWE authentication

Dual Authentication (Sensitive Operations)

  • Payment processing (/payments)
  • Withdrawals (/withdrawals)
  • Manager invites (/invites)
  • Company settings updates
  • High-value transactions
Note: These operations require both JWT (obtained via SIWE) and additional SIWE signing
SDK Recommendation: Use the Rise SDK for automatic authentication handling. The SDK will use SIWE to generate JWT tokens and automatically add SIWE signing when required for sensitive operations.

Authentication Flows

Whether you use the SDK or call the API directly, the same handshake runs underneath: ask Rise for a SIWE message, sign it with your wallet, then exchange the signature for a JWT. The SDK does all three steps for you. The JWT is valid for 24 hours. The SDK refreshes it for you; if you drive the handshake yourself, re-run it when the token expires.

SIWE Authentication Flow

The SDK manages the complete SIWE authentication process:
1

Initialize SDK

Configure the SDK with your Rise ID and private key
2

Automatic JWT Generation

SDK generates SIWE message, signs it, and obtains JWT token
3

Token Management

SDK automatically handles JWT token renewal
4

API Access

Execute API calls with automatic authentication handling

JWT Authentication Flow

For integrations using pre-generated JWT tokens:
1

Obtain JWT Token

Retrieve JWT token from your existing authentication system
2

Initialize SDK

Configure the SDK with your JWT token
3

API Access

Execute API calls with automatic JWT header inclusion
4

Token Management

Handle token expiration through manual renewal or token refresh

Understanding Authentication

How SIWE Authentication Works

How JWT Token Authentication Works

SDK Configuration Options

The Rise SDK provides two configuration options to access the APIs:

Using Rise ID and Private Key

  • Automatic JWT generation: SDK handles SIWE authentication automatically
  • Comprehensive access: Full access to all API operations
  • Session management: Automatic JWT token renewal
  • Wallet-based: Uses your wallet credentials for authentication

Using JWT Token Only

  • Pre-generated tokens: Use existing JWT tokens for authentication
  • Basic access: Access to read operations and basic integrations
  • Simple setup: Direct API access without wallet signing
  • Limited scope: Cannot perform sensitive operations requiring SIWE

Quick Start with SDK

Using JWT Token Authentication

JWT Token Management

SDK Recommendation: Use the SDK’s automatic JWT generation for simplicity. The SDK handles all the complexity of SIWE message generation, signing, and JWT token management for you.

SDK Features

Automatic Token Management

Token Generation

Manual Token Refresh

Token Validation

Error Handling

The SDK provides comprehensive error handling for authentication scenarios:

Common Error Scenarios

Security Best Practices

  • Use environment variables for all sensitive data
  • Use secondary wallets for API operations
  • Implement comprehensive error handling

Security Considerations:

  • Never store private keys in code
  • Never commit credentials to version control
  • Avoid using main wallets with significant funds for API operations
  • Never ignore authentication errors

Next Steps

Private Keys Guide

Learn how to get and use private keys

Secondary Wallets

Use dedicated wallets for API operations

SDK Examples

See more SDK usage examples

Security Best Practices

Comprehensive security guidelines
Ready to integrate? Review our Quickstart Guide to begin using the Rise SDK with authentication.