Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.
Mark Njung'e edited this page May 12, 2018 · 2 revisions

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
Clone this wiki locally