question

muhammad-adeel avatar image
muhammad-adeel asked David Marginian Deactivated commented

401 Unauthorized Production API

I am getting 401 Unauthorized error in the Production APIs.
I have successfully get the access_token from OAuth following the steps in the documentation.
However sandbox is working fine.
Here the complete URL to fetch the Order types on Production.

https://api.clover.com/v3/merchants/xxxxxxxxxxxxx/order_types?access_token=redacted

Is it possible to call this API from any Android device or it requires only Clover device?

REST APIOAuthAPI TokenAuth
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered muhammad-adeel commented

I assume your app has been installed by the merchant in question? If so, I would verify the permissions on your production app match the permissions on your sandbox app.

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

muhammad-adeel avatar image muhammad-adeel commented ·

Currently our ap is Pending from Clover and did not Published yet. I have install the app manually on an Android device from Clover store or tried by installing from Android studio. But every time I am getting an Unauthorized error.

Appreciate your response.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ muhammad-adeel commented ·

If your app is not published yet then you cannot install it for a merchant and thus cannot obtain a valid OAuth token so the 401 is expected.

0 Likes 0 ·
muhammad-adeel avatar image muhammad-adeel David Marginian ♦♦ commented ·
Right, Thank you so much. So it means we are unable to use the Production build until Clover has approved it?
0 Likes 0 ·
Show more comments
Show more comments
muhammad-adeel avatar image muhammad-adeel commented ·
Also, I'm able to successfully get access_token following all the steps for OAuth. But on the next screen when I am trying to fetch orders, it gives me 401 error.
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ muhammad-adeel commented ·
As you previously mentioned, your app is not approved and not in the app market. You cannot obtain a valid access token.
1 Like 1 ·
muhammad-adeel avatar image muhammad-adeel David Marginian ♦♦ commented ·

Right. @ David can we use the Production app on any Android (non Clover) device?

0 Likes 0 ·
Show more comments
muhammad-adeel avatar image
muhammad-adeel answered David Marginian Deactivated commented

@David, Can we submit a build with the Sandbox app credentials for the approval.
The issue that we are facing right now is that on the one hand our app is currently not approved and on the other hand Clover team is getting 401 after OAuth completed. That's why they are rejecting our app.
We are currently stuck for the app approval. Please suggest. Thank you!

1 comment
10 |2000

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

David Marginian avatar image David Marginian ♦♦ commented ·

Please ask devrel this question, it isn't clear to me if they are testing your app in production or sandbox.

0 Likes 0 ·

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