Function for base64 encoding of the Spotify Client IDs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Defining base64 encoding of the IDs | |
def base64_encode(client_id,client_secret): | |
encodedData = base64.b64encode(bytes(f"{client_id}:{client_secret}", "ISO-8859-1")).decode("ascii") | |
authorization_header_string = f"{encodedData}" | |
return(authorization_header_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment