We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d2f938e + 12007c9 commit 71826d3Copy full SHA for 71826d3
twitch/helix/helix.py
@@ -38,13 +38,16 @@ def __init__(self,
38
f"&client_secret={client_secret}"
39
"&grant_type=client_credentials").json()['access_token']
40
41
+ if bearer_token.lower().startswith('bearer'):
42
+ bearer_token = bearer_token[6:0]
43
+
44
self.api = API(Helix.BASE_URL,
45
client_id=client_id,
46
client_secret=client_secret,
47
use_cache=use_cache,
48
cache_duration=cache_duration,
49
handle_rate_limit=handle_rate_limit,
- bearer_token='Bearer ' + bearer_token.lower().lstrip('bearer').strip())
50
+ bearer_token='Bearer ' + bearer_token.lower().strip())
51
52
def users(self, *args) -> 'helix.Users':
53
return helix.Users(self.api, *args)
0 commit comments