question

coder12 avatar image
coder12 asked parquet76 answered

401 Attempting to Generate a PAKMS key

I am currently attempting to generate a PAKMS key in my sandbox account using the Ecommerce API. I am successfully generating an auth token and the ecommerce payment was working fine with v1 oauth flow, but after migrating to v2 oauth (refresh tokens) ,I get {"message":"401 Unauthorized"}.
 
curl --request GET \  --url 'https://apisandbox.dev.clover.com/pakms/apikey' \  
--header 'accept: application/json' \  
--header 'authorization: Bearer {auth_token}'
 
Is there a sandbox setting I'm missing or is there a separate sandbox for the Ecommerce API?
Upon looking through the documents here and here, amongst many other places but have failed to get this issue resolved. Is there a step missing after migration to get ecommerce hosted checkout working again?

I am using the clover hosted checkout page here.

Another question is, is this pakms key app specific or merchant specific? Will we need to generate and save a seperate pakms per merchant or just once per app and reuse it?
 
I have already taken a look at https://docs.clover.com/docs/401-unauthorized
OAuthecommerceclover-hosted-iframeecomm
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

·
parquet76 avatar image
parquet76 answered

Does your app have the correct permissions? https://docs.clover.com/dev/docs/ecommerce-app-permissions. If you have adjusted the permissions have you uninstalled/reinstalled your app and obtained a new token?

10 |2000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community