Authentication
The Parra API requires authentication for all requests. Parra offers two ways to authenticate your API requests: Basic authentication and OAuth2 (recommended) with a token. Authenticated requests may be sent to the Parra API using the Authorization
header.
Using the Parra SDKs
If you use one of our official SDKs, you won't have to worry about any of the above — fetch your access token from the Parra dashboard under API settings, and the client library will take care of the rest. All the client libraries use OAuth2 behind the scenes.
Custom integrations
Access Tokens
In order to make authenticated requests on behalf of one of your users, you must sign an Access Token. Access tokens are most commonly used when integrating with the Parra SDK. Read more about access tokens here.
API Keys
In order to make authenticated requests directly to the Parra API on behalf of your tenant you must use an API Key. Read more about API Keys here.
Basic authentication
With basic authentication, you use your username and password to authenticate your HTTP requests. Unless you have a very good reason, you probably shouldn't use basic auth. Here's how to authenticate using cURL:
Example request with basic auth
curl https://api.parra.io/v1/conversations \
-u username:password
Please don't commit your Parra password to GitHub!
OAuth2 with bearer token
The recommended way to authenticate with the Parra API is by using OAuth2. When establishing a connection using OAuth2, you will need your access token — you will find it in the Parra dashboard under API settings. Here's how to add the token to the request header using cURL:
Example request with bearer token
curl https://api.parra.io/v1/conversations \
-H "Authorization: Bearer {token}"
Always keep your token safe and reset it if you suspect it has been compromised.