newtonmunene99 / mpesa-api

A NodeJs Module to help you with M-Pesa Daraja API calls.
http://npmjs.com/package/mpesa-api
MIT License
108 stars 54 forks source link

Initiator Password in Daraja 2.0 #37

Closed ALWISHARIFF closed 2 years ago

ALWISHARIFF commented 2 years ago

Hello Team, I am trying to access use the mpesa-api to make the request of authorization but gives me a 400 status invalid credentials unAuthorized error.I am trying to confirm the link in the documentation of how to get my initiator For the initiator_password, use the security credential from the test credentials page.link :https://developer.safaricom.co.ke/test_credentials As specified in the docs the link to get the initiator password isnt working.I have a page under this link when logged in https://developer.safaricom.co.ke/Profile When I view it there is a place to generate security credentials but above it there is a password field I have come to know you can type anything and a key will be generated which password is required to generate a security credentials and is it same as initiator password on sandbox Thank You

ALWISHARIFF commented 2 years ago

The way to get credentials in daraja 2.0 is to go to the api's page and select the b2c simulate option choose the api credentials to use on the simulator the credentials will be generated in the simualtor you can then copy and paste the credentials

tmhevencent commented 1 year ago

@ALWISHARIFF how do you do that for production? it works on test.

MarkxOBrian commented 5 months ago

For those like me who are here looking for Test credentials for Daraja API V2 Sandbox, you can send an email to APIfeedback@safaricom.co.ke or APIsupport@safaricom.co.ke and they will send you updated credentials. I realized they get updated after a while.