All of our API endpoints are protected. They all require an API key, and most require an Account ID as well, to access.
Having two, individual pieces of identification sent with each request allows us to have API keys that can manage multiple Sub-Accounts. A common use case for this is for a Voxpopme partner to create Sub-Accounts for their own customers, which are managed by the partner’s Master Account. This setup allows our partners to separate customer data into different Voxpopme accounts, as well as grant managed access to their Voxpopme accounts with SSO.
API Authentication Headers
Regardless of whether or not you’re planning to run this setup, each request needs to be authenticated with an API key. To do that, you need to set x-api-key
as a header in each request you make. If the API documentation also asks for an Account ID, specify account-id
header.
Below is a Javascript snippet showing a correctly authenticated, and working request:
fetch('https://developer.voxpopme.com/v2/question', {
headers: {
'x-api-key': 'your_api_key',
'account-id': 'your_account_id'
}
});
Comments
0 comments
Please sign in to leave a comment.