question

pritesh25 avatar image
pritesh25 asked David Marginian Deactivated answered

access_token not working on every api endpoint

We have three clover devices with sandbox environment for single account.

During development process we i found that the access_token which device return us using Clover SDK, sometime it is not working with all the API. In my case:

For example:

I used access_token to fetch Order Detail API and it returns valid data with success code but when i try to send notification to clover devices by using Notification API it returns "401 Unauthorized".

I'm attaching two screenshot showing that using same access_token Order Detail API return success response whereas Notification API returns "401 Unauthorized".


notification_app.pngNotification API Response


docs-clover-reference-ordergetorder.pngOrder Detail Response


When we update the access_token from one of other two devices API start working with success responses.

Why this issue is happening and how we can prevent such issue in future?

If you require all masked data, drop me email address, i will share you.

Thank you.


Clover Android SDKclover developer communityAPI 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.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered

You need to use your app's secret, not an access token for the notifications API, please see https://docs.clover.com/docs/app-notifications.

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