Basic access authentication is a way for a user to provide a username and password or username and API key when making an API request.
When making an API request that requires basic authentication, one of the required components of the request is a header key and value that looks like this:
Authorization: Basic X
Authorization
Basic X
X should be replaced with the Base64 encoded version of the users credentials and it is the only value that needs to be replaced in this header.
The first step is to base64 encode your credentials (your username and password).
You can either base64 encode from command-line: https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-base64-encode-and-decode-from-command-line/
Or you can use an online encoder such as this one, if you are okay with entering your credentials on a third-party website (at your own risk): https://www.base64encode.org/
If you use the online encoder, follow these steps:
accountUsername:accountPassword
or accountUsername:apiKey
)Alternative base64 encoder: https://www.debugbear.com/basic-auth-header-generator
Now that you have the encoded value of your credentials, you can enter your basic auth header into Apipheny, so you can call the API in your Google Sheet.
Authentication
Basic
, followed by a space, then paste your encoded credentialsHere’s what your header should look like:
Don’t forget to leave a space between Basic and your encoded credentials in the header value. There should be no other spaces in your headers.
Then just click the Run button at the bottom of Apipheny to call the API and confirm if your API request works successfully.
If you get an error, check your headers and confirm that you’ve encoded your credentials correctly.
Crypto API tutorials and more:
Sponsored by Zink Virtual Tip Jar & Rewording.io Paraphrasing Tool
Accept donations on Twitch | Accept donations on Discord | Accept donations on YouTube | Accept donations on Telegram | Accept donations on Twitter | Accept donations on TikTok | Accept donations on Instagram | Accept donations on LinkedIn | Accept donations on Facebook | Accept donations on your Website