So I am running the sample code provided by Google:
package com.neat.backend;
/**
* An endpoint class we are exposing
*/
@Api(
name = \"myApi\",
I got the same error message, and eventually tracked it down to making a request with a trailing /
in the URL where my API did not specify one. The trailing slash only causes an error for calls that provide an authorization token.
Apparently ControlFilter
(and therefore also GoogleAppEngineControlFilter
) did not recognize it as a valid endpoint and therefore did not bother attaching method_info
to the request. But then EndpointsServlet
thought it was valid and tried to authenticate without all the needed info!
The fix was easy: remove the trailing slash from the URL in my request. Tracking down the problem, however, was not! I see this was not your problem, but maybe this answer will help someone else.