I don’t know about the :443, but I thought graph.api.smarthings.com had to be https to work.
No i can confirm that http works
graph.api.smartthings uses https. If you use http you’ll notice that it will actually redirect to https. Port 443 is the standard port for https, like 80 for http.
Yes that’s right let me rephrase, some device have notifications options where you can provide them with a URL for a callback notification.
- Some device don’t support HTTPS (as you pointed out it redirects HTTP to HTTPS, so if HTTP works then HTTPS also works)
- They don’t support the url:port format, for instead of https://url:port can it return a more standard https://url. As you had mentioned HTTPS is be defacto port 443, so adding the port is redundant and breaks compatiblity with some devices
Are you saying that for callback notification, if you provide an https URL, they won’t accept it? But if they receive the http URL and it redirects to https anyways, it will be fine?
If you want to use the http form without the ports and let the redirect happen, I suppose you could do:
def url = getApiServerUrl() // e.g., "https://graph.api.smartthings.com:443"
url = url.replace("https", "http") - ":443" // http://graph.api.smartthings.com
Okay great so http will work as well. Yes it’s kinda of weird what it accepts.
(waiting for someone to berate me for not using a regular expression to do this) ![]()
:)) sometimes simple does the job! I guess it’ll work as long as ST doesn’t change the format otherwise I just might ping you for a Regex 
@RBoy - So you’re saying these devices won’t accept “https://…” or " …//server:port/…" as input via their UI, but will quite happily process these same strings if they’re provided in the Location header on a HTTP 302 redirect response?
No they don’t access http or port. I’m using an alternative mechanism using shortened URL’s to have a 3rd party redirect the http.
How often do we need to get the server’s URL? Just once when the app is initialized, or ongoing with each request? Or something else?
Thanks!
edit:
Also, does this have any effect on the https://graph.api.smartthings.com/api/smartapps/endpoints url usage?
not seeing any reference to those new methods in the docs http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/index.html
I’m also interested in better understanding how this applies to the OAuth workflow – particularly for those of us that are taking advantage of the ‘publish for me’ OAuth approach that allows other users to easily install our SmartApps.
Examples of UK users struggling with various SmartApps:
Wow, @joshua_lyon, I was just searching for this thread to raise the same issue.
Apparently, the UK users can’t use the OAuth workflow, even for “published” apps.
Is this because it crosses localization servers for the api? Or is this actually restricted even if it was replicated across the pond for a local account?
Hey guys,
Not trying to ignore the mentions for clarifications, honest!
There is an issue right now that prevents users outside the U.S. from installing SmartApps using the OAuth install flow. Engineering is actively working on a solution. We will follow up when we have a solution or more information.
Apologies for the delayed response and the inconveniences this issue may be causing.
@Jim any updates on the UK/EU OAuth install flow issue?
Im outside US, and have recently installed smart rules with no issues
@Squares I thought you’ve been using SmartThings for a while? I think @Jim might have been generalizing about “outside the US” as there are several Canadian and Latin American users who are technically outside the US, but are still hitting the US servers.
The OAuth install flow issue is specifically occurring for new users that are hitting the new auth servers dedicated to EU/UK users and are not able to authorize the apps mentioned above: https://graph-eu01-euwest1.api.smartthings.com/login/auth
I have just recently received hub v2 (i even create a new location) and have no issue with Oauth
Im definitely hitting US servers.
You are correct.
I don’t have any update other than this feature is under active development. I know that’s not a lot of information so maybe I should just avoid the question, but that’s the current state of it.