1.0.6 • Published 2 years ago

gojek-api v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

gojek-api

unofficial nodejs gojek api

Installing

using yarn

yarn add gojek-api

using npm

npm i gojek-api

Usage

using gojek api

const { GojekApi } = require('gojek-api')
const gojekApi = new GojekApi()

set the authorization token before make call to mostly all gojek endpoint

const token = "your_token_here" //without Bearer
gojekApi.setAuthHeader(token)

using gopay api

const { GopayApi } = require('gojek-api')
const token = "your_token_here" //without Bearer
const gopayApi = new GopayApi(token)

register gojek

const { GojekApi } = require('gojek-api')
const { v4 } = require('uuid');
const gojekApi = new GojekApi()
const deviceId = "RANDOM_DEVICE__ID"
const sessionId = v4()
await gojekApi.setdeviceId(deviceId)
await gojekApi.setSessionId(sessionId)
await gojekApi.getOtpRegist("email","the account name","628377777777")
await gojekApi.validateOtpRegist("0000","the token from otp regist")
1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago