Skip to main content

Authentication

To start using Qurable's APIs follow the next steps:

1. API Credentials

To access Qurable's APIs, you'll need:

  • API Key
  • API Secret

Contact your account representative to obtain these credentials.

2. Token Generation

Use your API credentials to retrieve an access token. This token must be included in all subsequent API requests. There are two options to generate the access token with your API Credentials: use AWS Cognito client SDK or call the auth/signin endpoint.

Note: As access token have a short expiration we recommend using the AWS Cognito client SDK to obtain it as it will handle the refresh flow.

2.a. Using AWS Cognito client SDK

Choose the SDK based on the language you are using to consume the APIs configuring it with the following params

  • For sandbox:
    • UserPoolId: us-east-1_W6by0DGkz
    • ClientId: 5d9v3h1mbncgl49pk5sbe12l56

2.b. Using the signin endpoint

If you prefer handling everything on your own without instaling AWS Cognito client SDK you can use the auth/signin endpoint including the apiKey and apiSecret as part of the body.

Request

The following code snippet shows how to consume the sandbox endpoint. You need to replace the {API-KEY}and {API-SECRET} placeholders with the real values.

curl -X 'POST' \
'https://api.sandbox.qurable.io/auth/signin' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"apiKey": "{API-KEY}",
"apiSecret": "{API-SECRET}"
}'

Sample Response

{
"idToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

3. Using the Token

Include the token in the Authorization header of all API requests as shown below, replacing the {YOUR_TOKEN} placeholder.

curl -X 'GET' \
'https://api.sandbox.qurable.io/...' \
-H 'Authorization: Bearer {YOUR_TOKEN}'