I am creating a project with App Engine and Cloud EndPoints using OAuth 2.0.
I created and configured all the clientIds (WEB, Android and iOS), but when both I run the server in local or I deploy to App Engine PROD, I always get the following problem:
WARNING: getCurrentUser: clientId 292824132082.apps.googleusercontent.com not allowed
This clientId 292824132082.apps.googleusercontent.com
is the default one generated automatically when you create the Cloud EndPoints the first time, and it is supposed to be overwritten when you configure you own clientIds and generate the Cloud EndPoint Client Libraries. I can see in my noteendpoint-v2.api
(My API is called NoteEndPoint
) that the clientIds inside are update, but I cannot get they are published to local or PROD.
Any clue about what I am doing wrong or I am forgetting?
If you are testing your endpoint in API Explorer you need to add it's ID as one of the accepted ones:
@Api(name = "myApi",
version = "v1",
...
clientIds = {Constants.API_EXPLORER_CLIENT_ID, yourOtherIds}
Where Constants.API_EXPLORER_CLIENT_ID is
public static final String API_EXPLORER_CLIENT_ID = com.google.api.server.spi.Constant.API_EXPLORER_CLIENT_ID;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With