Anyone else having problem using Endpoints right now? When I try to hit any of them nothing is happening.
I went to the example php file to see if I could hit them from there and I get the log in, the authorize screen, and then I get an error after hitting authorize:
Warning: Invalid argument supplied for foreach() in /var/www/exampleOauth.php on line 86 Warning: Invalid argument supplied for foreach() in /var/www/exampleOauth.php on line 119
@urman, my guess it that it might be related to the api login page.
I know I had some bookmarks that would take me right to the MyDevices screen. But if I wasn’t logged in it would just bounce me to the login screen. Now I get an error saying page can’t be found. The link seems to be pointed to a wrong spot.
We found the problem. Security concerns forced us to only accept HTTPS. We’ll be posting more about it tomorrow along with how to fix it. I’ll be on office hours as well to talk about it.
So basically moving everything to HTTPS should fix the problem.
hey all. I’ll be writing something up for tomorrows developer email, but the only change is you need to use HTTPS when interacting with anything to graph.api.smartthings.com.
So any commands or requests you’re sending in just need to be HTTPS
My problem right now is that the sample php linked from here: http://build.smartthings.com/labs/ (See the link: Install the example endpoint SmartApp) is still giving me the error message shown in the first post so I can’t seem to successfully get to the point of seeing what the endpoint addresses should be.
I hate to be a squeaky wheel here, but I’m wondering if someone could check on this? @megapixel@urman
I’ve tried to download the php file and set it up on a personal server but unfortunately it appears to be beyond my skills. I can’t seem to get it to play right.
I’d previously used the php file on SmartThings server without issue (23.23.13.21/exampleOauth.php) but now I keep getting the error code: Warning: Invalid argument supplied for foreach() in /var/www/exampleOauth.php on line 86 Warning: Invalid argument supplied for foreach() in /var/www/exampleOauth.php on line 119
I’m assuming the the php file located at the address above is the same as the one that I can download. If so, it appears that the problem is caused when the site tries to pull in the switches or locks that were authorized. Here’s the code in question:
Okay… here might be the problem! Urman said above that we need to change these to https. Is it possible that it’s running into an issue here because this is trying to point to just http?
Ok, not sure if you replaced the line in the PHP page or not, but now I’m getting a different page now when I authorize:
Error
500: Internal Server Error
URI
/oauth/authorize
Reference Id
6e460689-1edc-4cac-967b-2463ae710c51
Date
Thu Mar 27 18:13:50 UTC 2014
Class
java.lang.NullPointerException
Message
Cannot get property ‘scope’ on null object