Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Token #1

Open
maniamartial opened this issue Jun 29, 2023 · 0 comments
Open

Access Token #1

maniamartial opened this issue Jun 29, 2023 · 0 comments

Comments

@maniamartial
Copy link

class MpesaAccessToken:
r = requests.get(MpesaC2bCredential.api_URL,
auth=HTTPBasicAuth(MpesaC2bCredential.consumer_key, MpesaC2bCredential.consumer_secret))
mpesa_access_token = json.loads(r.text)
validated_mpesa_access_token = mpesa_access_token['access_token']

just got an error to all the apps I ever used the code
"File "C:\Users\hp\Desktop\Project\EmployNanny\payment\mpesa_Credentials.py", line 20, in
class MpesaAccessToken:
File "C:\Users\hp\Desktop\Project\EmployNanny\payment\mpesa_Credentials.py", line 25, in MpesaAccessToken
mpesa_access_token = json.loads(r.text)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant