Public health and discovery endpoints do not require an API key.
Get your API key
Sign up at developers.influship.com and find your API key under API Keys. New API customers receive 500 one-time starter credits with no expiry; no card is required to use them. Each key uses the same account balance. See Pricing for exhaustion and paid-billing behavior.Set it as an environment variable
.env file:
.env
Pass it in requests
INFLUSHIP_API_KEY environment variable automatically, so you can also omit the constructor argument entirely if the variable is set.
When authentication fails
An invalid or revoked API key returns401 unauthorized. An invalid OAuth token also returns 401.
A request without credentials to a supported payment-enabled endpoint returns a 402 payment challenge. Follow the selected payment protocol rather than treating the challenge as an invalid key. Other protected endpoints require credentials.
A typical API-key failure looks like this:
Key rotation
Creating another key does not revoke your existing keys. Rotate without interrupting traffic:- Create a new key in API Keys in the dashboard.
- Update your application’s secret and deploy the new configuration.
- Verify that requests using the new key succeed.
- Revoke the old key after all callers have switched.