BASE64.ENCODE

BASE64.ENCODE returns the base64 encoded version of a given string.

Function category: Base64

Syntax

BASE64.ENCODE(arg1)

Arguments

Description

arg1

A string.

Examples

Let's say we receive the following user information:

{
"data":{
"user":{
"name": "secret_username",
"password": "secret_password"
}
}
}

If we want to transform that user information into an authentication token, we would use the following function:

CONCATENATE("Bearer ", BASE64.ENCODE(JOIN(":", data.user.name, data.user.password)))

This returns the following:

Bearer c2VjcmV0X3VzZXJuYW1lOnNlY3JldF9wYXNzd29yZA==

Notes

To perform the opposite operation, decoding a given base64 encoded string, use BASE64.DECODE‚Äč