Authentication
You'll need to authenticate your requests to access any of the endpoints in the Verifiable API. In this guide, we'll look at how authentication works. For API requests, Verifiable uses OAuth2 with bearer token authentication.
OAuth2 with bearer token
The recommended way to authenticate with the Verifiable API is by using OAuth2. When establishing a connection using OAuth2, you will need your access token. Here's how to add the token to the request header using cURL:
Example request with bearer token
curl --location 'https://verifiable.co/api/v1/emails' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json'
Never commit tokens to source control systems like GitHub! Tokens should be treated with the same security precautions as passwords, and be injected into your application via environment variables or a secret manager.
To get a token, go to the API Keys page and create a new token with the permissions you need.
Always keep your token safe and rotate it if you suspect it may have been compromised.