Getting “Please select at least one device to authorize” when I try to authenticate

Continuing the discussion from Getting "Please select at least one device to authorize" when I try to authenticate:

I am getting this same error from both a custom app I created and IOTDB.bridge

If I look in the javascript console, I see “Failed to load resource: the server responded with a status of 400 (Bad Request)” when trying to access https://graph.api.smartthings.com/api/locations/{custom}/smartapps

If I try to go to that link, I see my Application definition in JSON. It seems to me there is a problem here with SmartThings. Add a little smartness to your things.

Any hint? Two different apps and one should be golden.

Are you devices listed under a US account or a UK account?

It is a US account.

I did manage to get the IOTDB.bridge to work… looking at my application now.

1 Like

Okay, figured it out.

For those coming to issues with this, make sure you check the Live Logging to see if any errors are posted. That helped me to find the issue.

However, it opens new questions. This issue came because my input values were set to required: true. The code I was using to get the bearer certificate was not passing these values to Smartthings. So to make it work, I set the required to false. That may not work for everyone, but in my case, it was the problem.

Questions:

  1. Does the oAuth process not allow input settings to be required: true? and…
  2. If it does allow this, how do you pass these parameters in the oAuth request?

Thanks.

Seems like they could improve the error messages…

First, I couldn’t authorize because I hadn’t published the app yet, but only figured that out when searching the forums for my error message “Please select at least one device to authorize” (which I had done).

After publishing, “Authorizing the selected devices failed. Please try again later or contact support@smartthings.com” apparently actually means check line 18 of your code, but again only know that because I searched the forums and found from there that in live logging I had code errors.

2 Likes