AuthAPI

Docs for AuthAPI methods.

1. getAuthData

 getAuthData(authParams: AuthParams): Promise<AuthData>

Get Auth Data to be used.


Accepts AuthParams :

appCode : 'BENOW' : App code for which auth data needs to be fetched. ex:

import * as mod91sdk from "@satyajiit.mod91/mod91-webview-sdk";

try {
    const authData = await mod91sdk.AuthAPI.getAuthData({ appCode: 'BENOW' })
} catch(e) {
    console.log(e.message)
}

Returns AuthData :

token : string : Auth Token

mid : string : Mid of merchant

tid : string : Tid of merchant

otherData : object : Other auth data which may be required.

2 . refreshAuthData

refreshAuthData(authParams: AuthParams): Promise<AuthData>

Refreshes Auth Data.


Accepts AuthParams :

appCode : AppCodes ["BENOW"] : App code for which auth data needs to be refreshed.


Returns AuthData :

token : string : Auth Token

otherData : object : Other auth data which may be required.

Last updated

Copyright Mod91 2024