Changes to the API URL and Key

Sending API Key

Whispir needs your API key to validate that the request is made genuinely by you, and ties it to your account for rate limiting and throughput capacity purposes. Currently the API key information is sent via the URL query params.

In line with the new API gateway changes, the key information has to be passed in via the ‘headers’ as well, using the x-api-key header value.

Important points:

  • The apikey is to be passed as both a query param and a header value.
  • The header key to be used is x-api-key. For example, x-api-key: YOUR-API-KEY. The value is the same as the apikey value sent in the headers.
  • The order in the headers doesn't matter. x-api-key can be passed as the last header value or the first or somewhere in the middle. Sending it is important; the order is not so important.
  • If the API key value is incorrect or not passed properly, a 403 Forbidden error will be returned by Whispir.
  • All other header parameters that you’re sending today, should be passed as-is. DO NOT remove them.

If you have any queries related to sending the API key, contact the Whispir Support Team. Provide as much detail as possible about your issue.

  • JSON
  • XML

Example: If your region is AP, then:

Current API key sending mechanism
Authorization: Basic YOUR-AUTH-HEADER

New API URL based on region and API key is sent via headers:
Authorization: Basic YOUR-AUTH-HEADER
x-api-key: YOUR-API-KEY

The only changes here are adding a new header value to carry the API key, and making the URL region-specific.