BASE64_ENCODE
Last updated
Was this helpful?
Last updated
Was this helpful?
The function BASE64_ENCODE accepts a and encodes that string.
While any arbitrary data may be encoded using base64, the BASE64_ENCODE function only encodes Strings. See for more details.
string (type: string) The string to be encoded as base64.
encoded_string (type: string) The base64 encoded string.
The BASE64_ENCODE function is needed when interacting with an external system that requires a base64 encoded string. For example, although take care of most of the hard work for you, certain authentication schemes require an access token to be base64 encoded. Assuming that the variable access_token held the string **"top secret!",**we might set the Authorization header with this expression.
The function is the opposite operation to BASE64_ENCODE. Rather than encoding a String, it will decode it. Encoding, and then decoding a String will produce the original String.