You can authenticate with the Ambassador API using your API username and API key.
You can find this information on your account settings page.
Your API key should never be shared or exposed. We provide an embeddable JavaScript snippet and SDKs for client-side integrations.
Credentials:
- API Username (ex. username)
- API Token (ex. xxxxxx)
URL Structure for an API Call:
https://getambassador.com/api/v2/[[API_USERNAME]]/[[API_TOKEN]]/json/event/record
Example:
https://getambassador.com/api/v2/<<API_USERNAME>>/<<API_TOKEN>>/json/event/record
Passing your API token in the request header
Alternatively, you can add your API key in the request header. The requires a change to the URL structure. For example:
This call:
https://getambassador.com/api/v2/[[API_USERNAME]/[[API_TOKEN]]/json/event/record
changes to:
https://getambassador.com/api/v2/[[API_USERNAME]]/token/json/event/record
After changing the URL structure, you will need to pass your token in the header in the format:
Authorization: Token [[API_TOKEN]]
For example, if your API Token was xxxxxxx, the header would be:
Authorization: Token xxxxxxx
Updated about a year ago