Developer Docs

Table of contents

Authentication

API version 1.0

All queries to the BSG API must be authenticated using a personal API key ― either Test or Live. Each request includes an X-API-KEY header containing your API key. The Test API key has the prefix test_; the Live API key has the prefix live_. The Test API key is intended for debugging the system, all requests using the test key return random information.

You can view and manage your API keys on the “SMPP/API Password” tab of the Integrations & API section in your personal account.

Your personal API key must be specified in the HTTP X-API-KEY header of any request.

API version 2.0

The authorization process is possible upon the availability of a token, using which each subsequent query to the API should be signed.

Token is passed in the header of any request, except when the token itself is received, when this code is not required:

"Authorization": "Bearer: {token}"

To receive a token, you need to send a request:

POST http://one-api.bsg.world/api/auth/login

Request Parameters

ParameterRequiredTypeDescription 
api_keyYesstringPersonal API key.

Request sample

{
  "api_key": "live_qlTEagQz1StNSbjlXM8k"
}

Response Parameters

ParameterTypeDescription 
bearerstringToken for authorization of API queries.

if the request is successful, you will receive a response:

{
  "bearer": "string"
}

To update the JWT token, you need to send a request:

POST http://one-api.bsg.world/api/auth/refresh

if the request is successful, you will receive a response:

{
  "bearer": "string"
}