Authentication

You'll need to authenticate your requests to access any of the endpoints in the API-DOC. In the guide, we'll look at how authentication works. API-DOC basic authentication

Basic Authetication

Basic authentication involves sending a username and password with each request. While this method is straightforward. To authenticate using Basic Authentication, include your username and password in the request headers.

Example

curl -X GET https://api.yourdomain.com/endpoint \
  -H "Authorization: Basic $(echo -n 'username:password' | base64)"

Nodejs example

const axios = require('axios');
 
const username = 'your_username';
const password = 'your_password';
 
const response = await axios.get('https://api.yourdomain.com/endpoint', {
  headers: {
    Authorization: `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`,
  },
});
 
console.log(response.data);

Was this page helpful?

Helpful (0)

Not helpful (0)

© Copyright 2024. All rights reserved.