Authenticate
Authenticate and get an access token
Authenticate
Authenticate with the FinHub API using OAuth 2.0 Client Credentials flow.
Token Endpoint
POST /api/v2/auth/sandbox/token
Required Headers
| Header | Value |
|---|---|
X-Tenant-ID | Your tenant ID |
Content-Type | application/json |
Request Body
{
"username": "your_username",
"password": "your_password",
"customerId": "your_client_id",
"customerSecret": "your_client_secret",
"accountType": "b2b"
}Example Request
curl -X POST "https://gateway.finhub.cloud/api/v2/auth/sandbox/token" \
-H "X-Tenant-ID: 1234567" \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"password": "your_password",
"customerId": "your_client_id",
"customerSecret": "your_client_secret",
"accountType": "b2b"
}'Response
{
"access_token": "eyJ4NXQiOiJNVFJsT1RFM1lXRmxNR1Jr...",
"token_type": "Bearer",
"expires_in": 10000
}Using the Token
Include in all subsequent requests:
Authorization: Bearer eyJ4NXQiOiJNVFJsT1RFM1lXRmxNR1Jr...
Next Steps
First Call
Make your first API call