question

trappist avatar image
trappist asked David Marginian Deactivated edited

Sandbox Oauth stuck mid-flow with a 404

In the first step of the oauth flow, we get stuck at this URL:

https://sandbox.dev.clover.com/oauth/authorize?client_id&redirect_uri=https%3A%2F%2Fgigwage-stage.herokuapp.com%2Fusers%2Fomniauth_callbacks%2Fclover%2Fcallback&response_type=code&state=71eb11eafed2cb8664fa62b6b212ee5ac193d799b0edfca8

In the debugger I see an important-looking 404 trying to hit this API endpoint:

https://sandbox.dev.clover.com/v3/merchants/3QR2YT0629941/apps/true?expand=appLocales%2CandroidVersion.releaseNote%2CdeviceTypes%2CavailableMetereds%2CavailableSubscriptions%2CcurrentSubscription%2Cmodules%2Cscreenshots%2Cbilling&_=1649865833015

For human readability, it looks like this unescaped:

https://sandbox.dev.clover.com/v3/merchants/3QR2YT0629941/apps/true?expand=appLocales,androidVersion.releaseNote,deviceTypes,availableMetereds,availableSubscriptions,currentSubscription,modules,screenshots,billing&_=1649865833015

If I had to guess, the path there should not end in `true`, as no such endpoint exists, which explains the 404. But I did not construct this URL, so maybe it indicates a misconfiguration somewhere on my end?

This is on Sandbox, a REST client app requesting a code rather than an access token. Using the access token locally I can make it past this point, but I cannot complete the integration with that setup, so this is from a remote server using "code".

REST APISandboxOAuth
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

·
trappist avatar image
trappist answered David Marginian Deactivated edited

screen-shot-2022-04-13-at-112104-am.png

Sorry for the low-context screenshot. The 0.5MB upload limit is a little restrictive. But maybe this helps.


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.

David Marginian avatar image David Marginian ♦♦ commented ·

Yeah, this is a known issue in sandbox, you have to connect to your app first (because apps in sandbox aren't publicly available in the app market), see https://docs.clover.com/docs/merchant-interaction#installing-your-test-app.

1 Like 1 ·
trappist avatar image trappist David Marginian ♦♦ commented ·

Thanks @davidmarginian! But after connecting, the issue persists. Is it maybe because I've "moved" the app from localhost to the staging server, and I need to create a new app rather than reconfiguring the existing one?

Also, this seems opposite of what I've had to do up until now. I uninstall the app for each iteration to avoid being asked to select a merchant to install it for.

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

"Thanks @davidmarginian! But after connecting, the issue persists."

Are you still trying to make the authorize call? You can't do that, you need to just select the app from the dashboard to trigger the flow.

1 Like 1 ·
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