Getting StartedAuthenticating on the API

Authenticating on the API

Authenticate Apara API requests by creating a Basic Authentication header from your API credentials.

Step 1: Get API Credentials (From Apara Portal)

  1. Sign in to the Apara Portal.

  2. Copy your USERNAME.

  3. Copy your PASSWORD.

These credentials are required for every authenticated API request.

Step 2: Authenticate a request

  1. Combine your credentials in the format USERNAME:PASSWORD.

    Example:

    aparaUser:aparaPass
    
  2. Encode the combined string in Base64.

Using:

const credentials = "aparaUser:aparaPass";
const encoded = Buffer.from(credentials).toString("base64");

console.log(encoded);

Expected output: YXBhcmFVc2VyOmFwYXJhUGFzcw==

  1. Add the encoded value to the Authorization header with the Basic prefix.

  2. Send your API request with the Authorization header.

Example:

Authorization: Basic YXBhcmFVc2VyOmFwYXJhUGFzcw==

The response depends on the endpoint you call, but every authenticated request must include the same Basic Authentication header format.