question

veerendra.jetty avatar image
veerendra.jetty asked ·

AuthCode not valid unable to retrieve PAKMS API Key

Hello,

We are getting "message": "401 Unauthorized" with Auth Code

Steps followed ( tried Sandbox and Prod )

----------------------------

1. Created a key request containing the merchant ID and Clover application ID

2. Sent the key request to the PAKMS key endpoint (GET https://api.clover.com/pakms/apikey ). Set the authorization: Bearer { auth_token}


Please help me to find out the mistake happened from our side.

e-commerce api
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

David Marginian avatar image
David Marginian answered ·

A code is not an access token - https://docs.clover.com/clover-platform/docs/using-oauth-20. A code is obtained in step 2 of the oauth flow. A token is requested (based on the code, app id, app secrete, etc.) and retrieved in steps 3 and 4 of the oauth flow.

5 comments Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi David, what is the API Call to retrive Access Token using code generated at step ?

0 Likes 0 · ·

Please read the docs that I previously linked. The request is listed under step 3.

0 Likes 0 · ·

It worked Thanks.

So any type of transactions using clover API with " apiAccessKey " will reflect in respective Merchant Clover account ?


0 Likes 0 · ·

That is correct.

0 Likes 0 · ·
veerendra.jetty avatar image veerendra.jetty David Marginian ♦♦ ·

Thanks David

0 Likes 0 · ·

Welcome to the
Clover Developer Community