I am receiving an error when attempting to initiate an oauth “no healthy upstream” which is associated with a HTTP 503 response code.
Is this on the Authorize
call? What’s your app ID and what’s the full error message?
Our app ID is sq0idp-cyBwvH4qbp7cOmRD6aVpSA and yes this is during the authorize call. This is happening with both our test and production accounts. Below is a sample of the URL we are sending users to for completing the OAuth (with our test account, not production account). The “no healthy upstream” is the whole error message.
Looks like the issue is the url, it has an extra /
after the oauth2/authorize.
It is this right now:
https://connect.squareup.com/oauth2/authorize/?client_id=sq0idp-WnrVtbIKOqhZXPoHGXwneA&response_type=code&scope=MERCHANT_PROFILE_READ+ITEMS_READ+INVENTORY_READ+ORDERS_WRITE+PAYMENTS_WRITE+ORDERS_READ&state=52ef72c3-4cec-40c4-a85e-828f21102cec&session=false
Should be this:
https://connect.squareup.com/oauth2/authorize?client_id=sq0idp-WnrVtbIKOqhZXPoHGXwneA&response_type=code&scope=MERCHANT_PROFILE_READ+ITEMS_READ+INVENTORY_READ+ORDERS_WRITE+PAYMENTS_WRITE+ORDERS_READ&state=52ef72c3-4cec-40c4-a85e-828f21102cec&session=false
Strictly speaking, if that’s the fix (and it is a simple fix), those two URLs should behave identically and it’s considered buggy for the form with the extraneous / to not work.
This is because these two URLs are considered identical:
In fact, many/most webservers will auto-redirect the first to the second (eg Apache does).
Cheers,
Brian
We have a documented example in our API Reference that shows that the extraneous /
isn’t required or optional. So this is behaving correctly.
The completed URL looks similar to the following example: https://connect.squareup.com/oauth2/authorize?client_id={YOUR_APP_ID}&scope=CUSTOMERS_WRITE+CUSTOMERS_READ&session=False&state=82201dd8d83d23cc8a48caf52b