OAuth - MarkNjunge/PesaLib GitHub Wiki
Generates an OAuth access token to access other APIs.
API url: https://developer.safaricom.co.ke/oauth/apis/get/generate-1
Original url: https://sandbox.safaricom.co.ke/oauth/v1/generate
Usage
pesaLib.oAuth()
.then(oAuthResponse=> console.log(oAuthResponse))
.catch(error => console.log(error));
Returns an OauthResponse object
accessToken: String
expiresIn: String