-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Using the same name for the consumer_key and consumer_secret variables throws an error of UnboundLocalError: local variable 'consumer_key' referenced before assignment.
Renaming the global variables as follows and replacing them inside the get_access_token() and _access_token() functions fixes the issue
consumerkey = 'xxxxxxx'
consumersecret = 'yyyy'
...
def get_access_token():
consumer_key = consumerkey
consumer_secret = consumersecret
endpoint = 'https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials'
Metadata
Metadata
Assignees
Labels
No labels