Keys
This guide covers how to get an API key (also called an access token) for your Assembly account.
Once your Assembly account is set up, you can obtain an API key that is associated with it.
Note: You have different API keys associated with your account, depending on the environment. Ensure that you are selecting the appropriate API key from your desired environment.
Walkthrough
-
On your Dashboard, go to Account.
-
On the Account page, under Your Details, click on the button under API Key:
- Display pre-live API token for pre-live
- Display API token for production
This reveals the API key associated with your account for that environment.
-
Copy the API key.
-
Note your API endpoints:
- Pre-live - https://test.api.promisepay.com
- Production - https://secure.api.promisepay.com
Usage
There are two ways that you can use the API key:
Compound
Use your API with your username in API calls, such as:
curl -X "GET" https://secure.api.promisepay.com/users" -u "[email protected]:yourAPIkey"
Encoded
Encode your username and API key combination using tools such as Base64 Encode. This returns a single key which you can use as a header in your API calls:
curl -X "GET" https://secure.api.promisepay.com/users" -H "Authorization: Basic yourEncodedKey"
Use either of these methods in setting up your integrations with Assembly’s service.
Updated over 4 years ago