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

Unable to generate access token. #16

Open
LBwaks opened this issue Jul 26, 2023 · 0 comments
Open

Unable to generate access token. #16

LBwaks opened this issue Jul 26, 2023 · 0 comments

Comments

@LBwaks
Copy link

LBwaks commented Jul 26, 2023

I have upgraded to version 1.3.0 and now the generate_access_token method is raising a Unable to generate access token error.

File "/home/bwaks/Desktop/tech/Job/views.py", line 418, in MakePaymentView
response = cl.stk_push(phone_number, amount, account_reference, transaction_desc, callback_url)

File "/home/bwaks/Desktop/tech/tech/lib/python3.10/site-packages/django_daraja/mpesa/core.py", line 115, in stk_push
'Authorization': 'Bearer ' + mpesa_access_token(),

File "/home/bwaks/Desktop/tech/tech/lib/python3.10/site-packages/django_daraja/mpesa/utils.py", line 176, in mpesa_access_token
access_token = generate_access_token()

File "/home/bwaks/Desktop/tech/tech/lib/python3.10/site-packages/django_daraja/mpesa/utils.py", line 149, in generate_access_token
raise MpesaError('Unable to generate access token')
django_daraja.mpesa.exceptions.MpesaError: Unable to generate access token

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