Authentication
Ware2Go supports bearer token type authentication for requests. This page provides guidance on how to generate a Bearer Token.
Get your API user name and secret
See the Getting Started page for details about creating an API user and finding the user's API secret.
Bearer Tokens
Bearer tokens provide a way to authenticate your API requests that can be easily rotated without having to change your API user's secret key. Use the Authentication API to create a bearer token. To create a bearer token send your API user name and secret to the /token
endpoint as values for client_id
and client_secret
in the body of the request. The sample code below shows an example request to the /token
endpoint:
curl --request POST \
--url https://auth.staging.tryware2go.com/auth/realms/ware2go/protocol/openid-connect/token \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=APIUSER \
--data client_secret=APISECRET998877
The resource returns a bearer token, as shown in the example below:
{
"access_token": "THIS_IS_YOUR_BEARER_TOKEN",
"expires_in": 1800,
"refresh_expires_in": 0,
"token_type": "Bearer",
"not-before-policy": 0,
"scope": "email entitlements profile"
}
Updated 1 day ago