The Rime Platform API uses the OAuth2 Client Credentials Flow for secure, machine-to-machine authentication.
Our service team will provide you with your sandbox client ID and client
secret after registration.
Obtaining an access token
Prerequisites
You will require the following information to sucessfully obtain an access token:
- Your application’s client ID (
client_id
)
- Your application’s client secret (
client_secret
)
Requesting an access token
To obtain an access token, send a POST
request to the /oauth2/token
endpoint with the following parameters:
client_id
: Your application’s client ID
client_secret
: Your application’s client secret
grant_type
: Must be set to client_credentials
scope
: Must be set to openid offline
audience
: Must be set to sandbox.api.rime.finance
curl -i -X POST "https://sandbox.api.rime.finance/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope=openid offline" \
--data-urlencode "client_id=<client_id>" \
--data-urlencode "client_secret=<client_secret>" \
--data-urlencode "audience=sandbox.api.rime.finance"
Our authentication server will validate your credentials and issue a signed JSON Web Token (JWT). The response will look like this:
{
"access_token": "eyJhbGciOi...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "read:orders write:orders"
}
Include the access token in the Authorization
header of subsequent API requests:
GET /api/v1/orders
Authorization: Bearer <access_token>
Example: Using the access token to list accounts
curl --request GET \
--url https://sandbox.api.rime.finance/v1/orders \
--header 'Authorization: Bearer <token>'