question

ivalu8 avatar image
ivalu8 asked kenji-pa commented

All of a sudden 401 on DevKit

As of about an hour ago - all requests from devkit to sandbox are throwing 401

Token is valid on both v2 and v3

https://apisandbox.dev.clover.com/v2/app/valid_token?access_token={token} https://apisandbox.dev.clover.com/v3/access_tokens/{token}

but

https://apisandbox.dev.clover.com/v3/merchants/TA7DV4W2E0MWP?access_token={token}&expand=address

throws 401

DevKit
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.

Mike M avatar image Mike M commented ·

Edited to scrub access tokens.

0 Likes 0 ·
ivalu8 avatar image ivalu8 commented ·

token doesn't work anyway any thoughts on why?

0 Likes 0 ·
kenji-pa avatar image kenji-pa commented ·

Oops I have mistaken my merchant id. Please ignore this comment :P

--

I have the same problem too. The access token is generated in Account Settings -> API Tokens.

Example curl:

curl https://apisandbox.dev.clover.com/v3/merchants/RCTST0000008099/orders -H 'Authorization: Bearer {token}'

{"message":"401 Unauthorized"}

0 Likes 0 ·
Mike M avatar image Mike M commented ·

I actually am experiencing a similar (if not the same) issue with my emulator. I have filed an engineering ticket to have this examined further.

For the interim, can you try uninstalling and reinstalling your app through the App Market (via web dashboard or app)? That should force a token resync.

0 Likes 0 ·
ivalu8 avatar image ivalu8 commented ·

it seems to be working as of late last night(~11pm est). however, when it was not working nothing helped : install/uninstall, restarting the terminal, uninstall+restart, clean install. curl, postman, devkit station requests all resulted in 401, even though token validators both v2 and v3 responded with "valid token" and proper permissions.

one thing to mention - an android tablet running clover with a different merchant id, but on the same sandbox account and on the same app had no problems.

0 Likes 0 ·

1 Answer

kenji-pa avatar image
kenji-pa answered

I have the same problem too. The access token is generated in Account Settings -> API Tokens.

Example curl:

curl https://apisandbox.dev.clover.com/v3/merchants/RCTST0000008099/orders -H 'Authorization: Bearer {token}'

{"message":"401 Unauthorized"}

10 |2000

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