question

xantrac avatar image
xantrac asked David Marginian Deactivated edited

Unknown Client ID from test environment

Hello, I'm currently developing a web app using the rest api.

I'm testing the full oauth flow exchanging an authorization code

screen-shot-2021-03-27-at-102217-pm.png

https://sandbox.dev.clover.com/oauth/token?client_id=some_client_id&client_secret=some_client_secret&code=some_code


client_id , client_secret, and code come as parameters of callback url after Clover authentication and correctly match my app id and secret. Everything apparently looks correct but it is returning

{
    "message": "Unknown Client ID"
}


I'm not sure what else could influence my application lookup.


Looking into the forum index I found other similar issues with no response. I hope to get more luck this time.


Thank you

OAuth
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 David Marginian Deactivated edited

The client id should be your app id, this post may help - https://community.clover.com/questions/22380/unknown-client-id-2.html. In this case the developer was trying to use a production client id in sandbox. If you are still having issues provide me the client id you are passing in a private/moderators only post.

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

xantrac avatar image xantrac commented ·

Thank you for the answer,


I can confirm the client id is the app id.


Interesting, the url generated the Example OAuth Request link uses the production host

                    
  1. https://www.clover.com/oauth/authorize?client_id=my_id


Is this correct or am I supposed to see a sandbox link in here?


Is there some configuration step am I missing?


Thank you in advance

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

What are you doing, selecting the "Example OAuth Request" link? I just tested that link from sandbox, and it does not generate a www.clover.com url. It sounds like you are logged into a production developer account. Production and sandbox are distinct/separate environments. An app that was set-up in sandbox will not exist in production and vice-versa. You need to login to your sandbox developer account. If you need more help see this article - https://community.clover.com/articles/29543/obtaining-an-access-token-via-the-oauth-flow-in-sa.html.

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