Created
January 19, 2020 01:05
-
-
Save kaivalyapowale/0627a2cd07327107197232d8eb55540b to your computer and use it in GitHub Desktop.
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