Encode Credentials to Base 64 (Basic Authentication)

Encode Credentials to Base 64 (Basic Authentication)

Some API platforms may use Basic Access Authentication, where the request Key is 'Authorization', and the Value is 'Basic '+ the base 64 encoding of a user ID and password.

Encode credentials

To encode your credentials, type your username and password into this form, using the format username:password. Your encoded credentials will appear underneath.

The encoding script runs in your browser, and none of your credentials are seen or stored by this site.

❓ Some platforms may require you to encode slightly different details, e.g. an API key instead of a user name, or a plus sign (+) instead of a colon in the middle. The platform documentation should contain the exact details of what needs to be encoded.

Alternate methods of encoding credentials

  1. Encode your credentials yourself by opening Developer Tools in your browser (F12 on Windows/Linux or option + ⌘ + J on OSX). In the console, type in the following and click enter:

    You'll need to substitute in your own user credentials for {username} and {password}, like this:
    basic-access-img1

    Copy this value (without the quotation marks).

  2. Try a header generator tool like this one.

Enter credentials into API Connector

Under Headers, enter Authorization as your Key, and Basic + {base64-encoded string} as the Value, like this:

AuthorizationBasic + {base64-encoded string}

It should look like this:
basic-access-img2

Comments:0

Leave a Reply

Your email address will not be published.