Skip to content
  • There are no suggestions because the search field is empty.

CREATING A BASE64 AUTHORIZATION KEY FOR API USE

EnrollNow API workflows require an authorization key to authenticate API requests. This authorization key is created by encoding your API credentials into a Base64 format.

Base64 utilities are commonly available for free online and are also included as utility functions on most modern laptops and workstations. Because API credentials may provide access to sensitive data, EnrollNow recommends working with your internal IT or technical team to determine the most secure method for generating your authorization key.

Important Security Note

Base64 encoding is not encryption. It simply converts credentials into a format that can be used in an API authorization header. Base64 does not require a secret key and can be easily decoded.

Because authorization keys are created from sign-in or API credentials, they should be treated as sensitive information. Authorization keys should only be shared with approved technical users who are responsible for the API integration.

To protect your credentials:

  • Do not share authorization keys publicly.
  • Do not send authorization keys through unsecured communication channels.
  • Use an IT-approved tool or local workstation utility whenever possible.
  • Regenerate the password used to create the key, and create a new encoded auth key based on the new password if the key is exposed or no longer needed.
  • Follow your organization’s internal security policies.

What You Need Before Creating an Authorization Key

Before creating an authorization key, you will need the credentials required for your API connection.

The raw string to encode is your username appended with a colon (:) appended with your password.

username:password

Creating a Base64 Authorization Key on a Mac

You can use the Terminal application on a Mac to generate a Base64 authorization key.

Follow these steps:

  1. Open Terminal.
  2. Enter the following command, replacing the example values with your actual credentials:

echo -n 'username:password' | base64

  1. Press Enter.
  2. Terminal will return a Base64-encoded value.
  3. Copy the encoded value and use it as required for your API authorization header.

Example

echo -n 'myusername:mypassword' | base64

This will return a Base64-encoded authorization key.

Creating a Base64 Authorization Key on a Windows computer

Windows users can generate a Base64 authorization key using PowerShell.

Follow these steps:

  1. Open PowerShell.
  2. Enter the following command, replacing the example values with your actual credentials:

[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("username:password"))

  1. Press Enter.
  2. PowerShell will return a Base64-encoded value.
  3. Copy the encoded value and use it as required for your API authorization header.

Example

[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("myusername:mypassword"))

This will return a Base64-encoded authorization key.

Using an Approved Third-Party or Online Base64 Utility

There are plenty of online Base64 tools that are found easily using an Internet search. EnrollNow cannot recommend or attest to the security of any specific external site or tool, so use caution when using online tools.

Before using an online Base64 utility, please confirm that the tool is approved by your organization’s IT or security team.

Using the Authorization Key

Once the Base64 authorization key is created, it is added to the API request authorization header, in the following format:Authorization: Basic [Base64 Authorization Key]

For more information about creating an Export API, please refer to this article.

For more information about creating an Import API, please refer to this article.

Summary

A Base64 authorization key can be created using built-in tools on a Mac or Windows computer, or through an IT-approved third-party utility. Because the key is created from API credentials, it should be handled securely and shared only with approved technical users responsible for the integration.