mychaelgo / gojek

Un-official Gojek & GoPay API Wrapper
MIT License
59 stars 15 forks source link

Not getting token after calling login API #2

Closed adhikasp closed 6 years ago

adhikasp commented 6 years ago

I got empty body {} after calling the login API.

var gojek = require('gojek')
gojek.login('MY_EMAIL , 'MY_PASSWORD function(error, resp    onse, body) {
         console.log(body);
 })

Result

{}
mychaelgo commented 6 years ago

@adhikasp hi, the endpoint changed

here sample request

curl -X POST \
  https://api.gojekapi.com/v3/customers/login_with_email \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
    "email": "YOUREMAIL"
}'
mychaelgo commented 6 years ago

@adhikasp hi, you can update npm gojek to version 1.1.0 you can login with function gojek.loginWithEmail() or gojek.loginWithPhone() and then call gojek.generateCustomerToken()

adhikasp commented 6 years ago

Cool, it's working now. Thanks a lot! :tada: