Generate a Bearer Token

This article describes how a bearer token can be generated using the API.

This use case is ideal for institutions relying on the WISEflow API and has built their own middleware to control key aspects of WISEflow.

Generating a Bearer Token

The POST /oauth2/token endpoint is used to generate a bearer token. Before you can generate a Bearer token, you must generate a 0Auth Client explained in this article.

The Bearer token is valid for one hour.

In the request body of the endpoint, you must enter the client_id, the client_secret and the grant_type. The client_id and the client_secret are visible on the 0Auth page on WISEflow. The grant_type should always be inputted as "client_credentials".

It is also possible to generate a Bearer token using the following curl command:

curl -X 'POST' \
  '' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=client_credentials'

The response will return the Bearer token and the expiration date:

  "access_token": "BEARER TOKEN",
  "expires_in": 3599,
  "scope": "",
  "token_type": "bearer"

The Bearer token should be passed in the request header as:

Authorization: Bearer {token}
Was this article helpful?
0 out of 0 found this helpful

Articles in this section