Supported Authentication Types
Information about the different authentication types we currently support
X-Api-Key
You will need to provide us with a key that we will use when making requests against your operator-api. We will send the key as a request header
curl --location --request GET 'https://operator-api.example.com/userdetails/123' \
--header 'X-Api-Key: super-secret-api-key'
Basic Auth
You will need to provide us with Id/Secret
curl --location --request GET 'https://operator-api.example.com/fasttrack/userdetails/123' \
--header 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='
OAuth
You will need to provide us with and endpoint from where we can fetch a access_token
POST Example:
curl --location --request POST 'https://operator-api.example.com/token' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_id": "123454",
"client_secret": "b57e12d9-eaca-49fa-9588-9541fd644051",
"grant_type": "client_credentials"
}'
GET Example:
curl --location --request GET 'https://operator-api.example.com/token?grant_type=client_credentials&client_id=123454&client_secret=b57e12d9-eaca-49fa-9588-9541fd644051'
Response we are expecting
{
"access_token": "eyJ0eXAiOiJasdaAAAAwwWiJIUzI1NiJ9.eyJpYXQiOasdasnduyuwwWQ5NTQsImV4cCI6MTYyNTE0MjE1NCwianRpIjoiMUtqMG1xMWZrRVVFNER0OTVXc2x3aSJ9.wZqFm2BcYtUyoXff7Zvl_LiAmZvnPFVlvGXTX34uqTE",
"expires_in": 7200, <- How long is the token valid in seconds, We will refresh the token before it's invalid
"token_type": "Bearer"
}
Example request with Bearer
curl --location --request GET 'https://operator-api.example.com/userdetails/1183833' \
--header 'Authorization: Bearer eyJ0eXAiOiJasdaAAAAwwWiJIUzI1NiJ9.eyJpYXQiOasdasnduyuwwWQ5NTQsImV4cCI6MTYyNTE0MjE1NCwianRpIjoiMUtqMG1xMWZrRVVFNER0OTVXc2x3aSJ9.wZqFm2BcYtUyoXff7Zvl_LiAmZvnPFVlvGXTX34uqTE'
Last updated
Was this helpful?