Error 500: Internal Server Error trying to get access token

Hi everybody,
I’m trying to get the access token in order to integrate SmartThings into my Android app.

I can get the “CODE” from the previous step (Get Authorization Code), but when I try to get the access token the system always returns:

Oh No! Something Went Wrong!
Error
500: Internal Server Error
URI
/oauth/token
Reference Id
f3d5078d-150a-4f74-ac58-7da27b2c0a4a
Date
Thu Aug 25 17:21:35 UTC 2016

This is the URL I use to make the POST:

https://graph.api.smartthings.com/oauth/token?grant_type=authorization_code&code=tZcCph&client_id=MY_CLIENT_ID&client_secret=MY_CLIENT_SECRET&redirect_uri=http://localhost

I saw there’re many other questions about this issue, but I could’t find a solution.

Does anybody knows why I always get this error?
I tried also to change my redirect_uri to https://localhost, but nothing changed.

Thanks in advance,
Giuseppe

Having the same trouble as of two days ago. This is definitely on the ST side. Support has been silent.

I have the same problem. Do you know how to resolve it?

Yes, I solved the problem:
before what I did was:

  1. get CODE -> OK
  2. read jsonOBJ value from the response of the system -> ERROR because I tried to get “token”, “expire” and also “REFRESH”. But I realized that SmartThings had no “refresh” field.
    So the only value I currently get from SmartThings auth are: “token” and “expires”.
    This solved my problem.

Giuseppe