Snapi SMS docs: Authentication

Authenticate yourself with our API.

Authentication

To use any of the Snapi SMS API endpoints, you'll need to authenticate yourself on each request. This is done via a Bearer token as a header.

  1. Send a Bearer Authorization header API key.

Authorization header

Header Value Description Required?
Authorization Bearer 1|FGsT3x8EHxLKO3jmDxxjEDGV8Opy8UmQKaaIQxwr Your API key Yes

Where to find my API key?

You can find your API keys under API keys within your account.

Creating a new API key

To authenticate requests you'll need an API key. Here's how to generate one:

  1. Go to your account's API keys section.
  2. Click on the Create API key link.
  3. Give your API key a name, expiration and abilities and then create. You'll need to make note of the key as you'll only be shown it once.

Example

Here's a quick example of how the API key can be applied to check the remaining credit balance on your account.

curl -X "GET" "https://api.snapisms.io/api/v1/balance/1|FGsT3x8EHxLKO3jmDxxjEDGV8Opy8UmQKaaIQxwr" \
              --header 'Authorization: Bearer 1|FGsT3x8EHxLKO3jmDxxjEDGV8Opy8UmQKaaIQxwr'
Authenticate with Snapi SMS API example