In iXpole we use the Client Credentials Grant flow. The Client Credentials Gran allows an application to request an Access Token using its Client Id and Client Secret. It is used for non interactive applications where the token is issued to the application itself, instead of an end user.
Request Access Token
To request a an access token, the client need to make a call to the endpoint with the following parameters.
The grant_type parameter must be set to client_credentials.
the client ID you got from your iXpole using customer.
the client Secret you got from your iXpole using customer.
If the request for an access token is valid, iXpole API will generate a JWT Token and will respond this to the client. The response with an access token contains the following properties:
The access token string as issued by the iXpole API
The type of token this is, in our case “bearer”
our tokens are valid for 1 hour (3600 sec). After that a new access token should be requested.
For example, a successful token response may look like the following:
Making API Requests
Now that the clien has an iXpole API access token, it needs to use it to make API requests. Use the access token in the authorization header as show in the example below.