question

veerendrajetty avatar image
veerendrajetty asked veerendrajetty commented

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

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 Deactivated answered veerendrajetty commented

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
10 |2000

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

veerendrajetty avatar image veerendrajetty commented ·

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

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ veerendrajetty commented ·

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

0 Likes 0 ·
veerendrajetty avatar image veerendrajetty commented ·

It worked Thanks.

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


0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ veerendrajetty commented ·

That is correct.

0 Likes 0 ·
veerendrajetty avatar image veerendrajetty David Marginian ♦♦ commented ·

Thanks David

0 Likes 0 ·

Welcome to the
Clover Developer Community