Skip to content

Commit a392ace

Browse files
committed
o wrap consumer key & secret in urllib2.quote() for completeness
1 parent 2e6d1a2 commit a392ace

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

get_bearer_token.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
# Step 1: Encode consumer key and secret
4343
#
4444

45-
base64_consumer_key_secret = base64.b64encode(CONSUMER_KEY + b':' + CONSUMER_SECRET)
45+
base64_consumer_key_secret = base64.b64encode(
46+
urllib2.quote(CONSUMER_KEY) + b':' + urllib2.quote(CONSUMER_SECRET))
4647

4748
#
4849
# Step 2: Obtain a bearer token

0 commit comments

Comments
 (0)