Authentication

Use API keys to authenticate your client requests when utilizing Cadana APIs.

Introduction

Ensuring secure and authenticated interactions with Cadana's API is paramount. This guide will walk you through the process of using your API key for authentication and testing its validity.

Using Your API Key

To make an authenticated request to Cadana's API, include your API key in the Authorization header of the request you send from your backend server:

Authorization: Bearer YOUR_API_KEY

Important Notes:

  • All API requests must be made over HTTPS.
  • Without proper authentication, your API requests will fail.

Testing Your Authentication

To ensure that your API key is set up correctly, you can make a test request to one of Cadana's read endpoints. If set up correctly, you should receive a successful response. If there's an issue with your authentication, you'll receive an error message detailing the problem.

For example:

curl -H 'Accept: application/json'
-H "Authorization: Bearer YOUR_API_KEY"
-X GET --url https://api.cadanapay.com/v1/test_endpoint

Replace YOUR_API_KEY with your actual API key and test_endpoint with a endpoint for testing from reference