Authentication
GameRamp API uses a secure two-step authentication process:- Generate HMAC-SHA256 signature using your API Secret
- Exchange signature for JWT tokens via login endpoint
Authentication Flow
1
Generate Signature
Create HMAC-SHA256 signature with your API Secret
2
Login Request
Send signature to
/auth/login endpoint3
Receive Tokens
Get JWT access token and refresh token
4
Authenticate Requests
Use Bearer token in Authorization header
Generating the Signature
The signature authenticates your API requests using HMAC-SHA256.Signature Components
Create a pipe-delimited string with three values:Signature Generation Steps
- Node.js
- Python
- C# / Unity
Login Request
Once you have the signature, make a login request:Request Body
Your API Key provided by GameRamp
Unique device identifier from client
Current UTC timestamp in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ)
HMAC-SHA256 signature encoded in Base64
Response
Using the JWT Token
After successful authentication, include the JWT token in all API requests:Required Headers
All authenticated endpoints require:Bearer token obtained from login
Set to
application/json for JSON payloadsYour tenant identifier
Your game identifier
Token Refresh
Access tokens expire after the duration specified inexpiresIn. Use the refresh token to obtain new tokens:
Security Requirements
Timestamp Validation
- Timestamps must be within 5 minutes of server time
- Use UTC time in ISO 8601 format
- Format:
YYYY-MM-DDThh:mm:ssZ
Best Practices
1
Secure Storage
Store API Secret in secure environment variables or key management systems
2
Server-Side Only
Generate signatures on your backend server, never in client applications
3
Token Management
Implement automatic token refresh before expiration
4
Error Handling
Handle 401 errors by refreshing tokens or re-authenticating
Error Responses
401 Unauthorized
Invalid signature or expired token400 Bad Request
Timestamp outside acceptable window (±5 minutes)Testing
Use these development credentials for testing:Test credentials only work in development environment.