Integrating Gravity with Your Application

Integrating Gravity into your application is a quick 3-step process:

  1. Get Your API Keys: Obtain your correspondent-specific API keys on the Gravity portal.
  2. Generate an Access Token: With your API keys in hand, generate an access token for your correspondent. After generation, include it in the HTTP header for all subsequent requests.
  3. Make Requests: Make a test request to make sure everything is set up correctly.

Example Request

POST
/v1/auth/token
curl -X POST 'https://api.sandbox.gravity.markets/v1/auth/token' \
-H 'Content-Type: application/json' \
-d '{ "apiKey": "YOUR-API-KEY" }'

Success Response

JSON
200 OK
{
    "token": "eyJhbG"
}