Reputation: 33
I am writing a backend for an Android app in Python using Google Cloud Endpoints. When I try to run Google's API Explorer to test my API on the development server (localhost), it gives me an error about SSL:
403 Forbidden
{
"error": {
"errors": [
{
"domain": "global",
"reason": "sslRequired",
"message": "SSL is required to perform this operation."
}
],
"code": 403,
"message": "SSL is required to perform this operation."
}
}
Google's documentation supports this:
Endpoints requires SSL. (https://cloud.google.com/appengine/docs/python/endpoints/ )
"The development web server does not support HTTPS connections" cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs
I have two inconvenient workarounds: use CURL to send commands to the development server (as the site below suggests) or test only deployed versions. The API Explorer was just so convenient, and it worked whenever I have used it for the last couple years, most recently in August 2014.
Does anyone know if requiring SSL for the API Explorer was recent change? Is there any way to use the API Explorer on the development server, as it says here ( https://cloud.google.com/appengine/docs/python/endpoints/test_deploy#running_and_testing_api_backends_locally)?
Thanks.
Upvotes: 3
Views: 629
Reputation: 1223
Work around found by Tyler Rockwood...
If you remove the hostname field from the @endpoints.api annotation it works again:
Won't work...
@endpoints.api(name="blah", version="v1", description="Blah", hostname="causesfailure.appspot.com")
Will work...
@endpoints.api(name="blah", version="v1", description="Blah")
or (even lamer) you can set the hostname to localhost while testing
@endpoints.api(name="blah", version="v1", description="Blah", hostname="localhost:8080")
Upvotes: 3