OAuth Internal Error

I am seeing an internal Smart Things error when attempting to call /oauth/authorize.

I beleive I have followed the documentation exactly, but have been able to get through this first (simple) step.

Error
500: Internal Server Error
URI
/oauth/authorize
Reference Id
b22bf166-9853-4261-9ef2-946b263c00ee
Date
Tue Aug 16 05:11:43 UTC 2016
I am calling: https://graph.api.smartthings.com/oauth/authorize?response_type=code&client_id=f325b40c-b270-4585-9ecb-e73fd1******&scope=app&redirect_uri=https://graph.api.smartthings.com/oauth/callback
I have tested this from multiple browsers.
I am following the documentation covering that API call is at http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/authorization.html (http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/authorization.html)
I am also following some basic documentation left by the old development team of this product.

Looks like you’re using graph.smartthings.com as the redirect_uri, it should be the uri of your Web server endpoint that accepts the token.

I have tried that too without any change, no request is ever received at the server. I switched to the smart things endpoint on the suggestion of others as a test.

https://graph.api.smartthings.com/oauth/authorize?response_type=code&client_id=f325b40c-b270-4585-9ecb-e73fd1******&scope=app&redirect_uri=http://108.61.251.***/oauth/callback

# tcpdump -n tcp port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel

I didn’t expect any though with a standard OAuth process given the error (unless there was some form of request for validation). The error is occurring on the first stage - normally the browser would just be redirected, and that clearly is not occuring due to the internal server error.

I have also tested the shard directly (na-02) and using a domain name, not an IP. None produce any different results.

I am experiencing the same issue.

I think that there is minimal validation on the selection page and then upon submit the OAUTH is validated. Since no valuable message or log occurs, it is hard to figure out what is happening.

@cpisano Indeed.

I don’t doubt the possibility of some silly mistake / trap. Unfortunately everyone I have got in contact with in regards to this issue does not have a solution.

I’ve had an open ticket with Samsung for the past 2 weeks, I’ll be sure to update this thread if there is any solution from that front…

1 Like

I just posted on a similar thread. Oauth Error for Obtaining Access Code 500

Maybe a solution?

I was able to eventually get past this…

What seemed to work was how I was calling the first authorization URL. I am using PHP, and assumed the call had to be a valid OAUTH call (with the headers all set properly). And I found out that was not the case.

I just simply redirected to the URL: https://graph.api.smartthings.com/oauth/authorize?response_type=code&client_id={0}&scope=app&redirect_uri={1} and it worked.

Let me know.

Fixed!

Step 1. Delete Application
Step 2. Create again with same code, getting you a new set of IDs.

1 Like