Skip to main content

API Authentication

Learn how to authenticate your API requests to Resync.

API Keys

All API requests require authentication using an API key. API keys are unique to your account and should be kept secure.

Get Your API Key

  1. Log in to Resync Dashboard
  2. Navigate to SettingsAPI Keys
  3. Click Create API Key or copy an existing one
  4. Store it securely (it won't be shown again!)

Authentication Methods

SDK Authentication

For client-side SDKs (JavaScript, React Native):

import Resync from 'resync-javascript';

await Resync.init({
key: 'your-api-key',
appId: 7,
storage: localStorage,
environment: 'production',
});

REST API Authentication

For server-side REST API requests:

curl -H "Authorization: Bearer your-api-key" \
https://api.getresync.com/v1/campaigns

Troubleshooting

"Invalid API key" Error

  • Check that you're using the correct key
  • Ensure the key hasn't been deleted
  • Verify there are no extra spaces or characters

"Unauthorized" Error

  • Confirm the API key is active
  • Check that you have the necessary permissions
  • Ensure you're using the Bearer token format for REST APIs

Rate Limit Exceeded

  • Implement exponential backoff
  • Cache responses when possible
  • Consider upgrading your plan

Next Steps