omise/omise-node

cannot create/retrieve token

Closed this issue · 2 comments

I'm testing omise services and while I can retrieve customers/cards fine, I cannot create/retrieve token. The error is

{ object: 'error',
  location: 'https://www.omise.co/api-errors#authentication-failure',
  code: 'authentication_failure',
  message: 'authentication failed' }

and i was using the same secret key when I test customer (actually run in one-go)

Is there a different key to use with token API?

zdk commented

@pongsakornsemsuwan
We have 2 types of key https://www.omise.co/api-authentication
Regarding Token API, it is required to use Public Key or pkey_

Thank you. It works now. I should've tested with pkey first. :)

The api doc is a little bit confusing though.
The python version example is using skey while curl version is using pkey.
https://www.omise.co/tokens-api