Learn how to authenticate with the ReplyLink API and manage access tokens securely.
This guide explains how to authenticate with the ReplyLink API to build integrations and custom applications.
ReplyLink API supports two authentication methods:
Include your API key in the request header:
curl https://api.replylink.com/v1/automations -H "Authorization: Bearer YOUR_API_KEY"
To keep your API key secure:
For apps that act on behalf of ReplyLink users, use OAuth 2.0:
- Name
- Description
- Website URL
- Redirect URI(s)
- Requested scopes
Redirect users to:
https://api.replylink.com/oauth/authorize?
client_id=YOUR_CLIENT_ID&
redirect_uri=YOUR_REDIRECT_URI&
response_type=code&
scope=read:automations write:messages
After authorization, we'll redirect to your URI with a code:
https://your-app.com/callback?code=AUTHORIZATION_CODE
Make a POST request to exchange the code for tokens:
curl https://api.replylink.com/oauth/token -X POST -d "client_id=YOUR_CLIENT_ID" -d "client_secret=YOUR_CLIENT_SECRET" -d "code=AUTHORIZATION_CODE" -d "redirect_uri=YOUR_REDIRECT_URI" -d "grant_type=authorization_code"
This returns:
{
"access_token": "ACCESS_TOKEN",
"refresh_token": "REFRESH_TOKEN",
"expires_in": 3600,
"token_type": "Bearer"
}
Include the token in your API requests:
curl https://api.replylink.com/v1/user -H "Authorization: Bearer ACCESS_TOKEN"
Access tokens expire after the time specified in `expires_in`. Refresh them with:
curl https://api.replylink.com/oauth/token -X POST -d "client_id=YOUR_CLIENT_ID" -d "client_secret=YOUR_CLIENT_SECRET" -d "refresh_token=REFRESH_TOKEN" -d "grant_type=refresh_token"
| Scope | Description |
|-------|-------------|
| `read:user` | Read user profile information |
| `read:automations` | View automation configurations |
| `write:automations` | Create and modify automations |
| `read:messages` | View message history and templates |
| `write:messages` | Send messages and create templates |
| `read:analytics` | Access engagement analytics |
| `read:contacts` | View contact list and segments |
| `write:contacts` | Modify contacts and segments |
Request only the scopes your application needs.
The API implements rate limiting to prevent abuse:
When you exceed the limit, the API returns a `429 Too Many Requests` response.
Rate limit headers included in responses:
| Code | Description | Solution |
|------|-------------|----------|
| 401 | Unauthorized | Check API key or token validity |
| 403 | Forbidden | Verify you have the required permissions |
| 429 | Too Many Requests | Implement rate limit handling and backoff |
If your token is rejected:
For additional help with API authentication:
By following these authentication guidelines, you can securely interact with the ReplyLink API while maintaining the security of your application and user data.
Learn about how ReplyLink integrates with Instagram's API for secure access to comments and messaging.
Learn how to create sophisticated automation workflows with conditional logic and multi-step sequences.