Getting an Access Token

To make API requests for data, you will need an “access token” to populate the header of your request.

Below we demonstrate how to get an access token using the popular HTTP client, “Postman“.  Once you have an access token, you can invoke the API to make a request for data.

1. In Postman, click on the “+” sign next to Requests in the menu “In This Workspace”:

This will take you to the following screen:

2. Change GET to POST. Then add the URL “https://apitoken.edgeworthbox.com/token” into the box where it says “Enter request URL”. The name of the request will change automatically to reflect the URL you have entered.

3. Click on “Body” and select the third radio button marked “x-www-form-urlencoded”. From here you will input four key-value pairs as below.

  • Key: grant_type | Value: client_credentials
  • Key: client_id | Value: the client ID copied from the EdgeworthBox credentials under API access with the copy button
  • Key: client_secret | Value: the secret copied from the EdgeworthBox credentials under API access with the copy button
  • Key: scope | Value: transactions/post

When complete, it will look the following (we have obscured the client_id and secret in this example; you will see yours transparently):

4. Hit “Send” and you will get an access token in the box below.

Screen Shot 2021-05-10 at 1.36.22 PM

Was this article helpful?
YesNo