question

sivap avatar image
sivap asked David Marginian commented

oauth code generation

Is there a way to obtain an OAuth code programmatically, i.e. without a human user logging in?

I use https://sandbox.dev.clover.com/oauth/authorize?client_id=<clientid> to generate code but this requires me to be logged into the clover web portal.

I need a headless way of generating "code" so i can use the rest of the clover REST API.



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 answered David Marginian commented

No, and this doesn't make a whole lot of sense. The whole point of the oauth flow is that the merchant needs to grant you access to their data. If this could be done programmatically anyone could get access to any merchant's data. Generally the approach will be to have the merchant authorize you (install your app) and then you securely store the token on your end.

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

Thanks for the reply. How long is the oauth code valid?


Imagine doordash orders flowing into the clover POS. Would the merchant keep clicking the doordash app ( either web or android) to retrieve the 'code'
0 Likes 0 ·
I'm very well aware of potential integrations. As I just mentioned you will obtain an access token and then securely store it.
0 Likes 0 ·
sivap avatar image sivap David Marginian ♦♦ ·

Thank you. What is the general expiry time for the code. Is it one year or a few days? I'm also asking out of ignorance about the process that clover POS users do to refresh the 'code' for apps like doordash, ue etc. What is the process or steps they go through? Your reply is much appreciated

0 Likes 0 ·
Show more comments

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