* We tried to select a google apps organization on project creation page, but this option was not
available in google cloud platform console. we try to create a project using admin domain account ([email protected]). *Following code we used to create Endpoint API with authentication:* @Api( name = "myApi", clientIds = { WEB_CLIENT_ID, ANDROID_CLIENT_ID, API_EXPLORER_CLIENT_ID}, audiences = {ANDROID_AUDIENCE}, scopes = {EMAIL_SCOPE}, version = "v1", namespace = @ApiNamespace( ownerDomain = "backend.myapplication.example.com", ownerName = "backend.myapplication.example.com", packagePath = "" ) ) public class MyEndpoint { @ApiMethod(name = "sayHi") public MyBean sayHi(@Named("name") String name, User user) { MyBean response = new MyBean(); if (user == null) { response.setData("Invalid Access.."); return response; } response.setData("Hi, " + name + " Authentication Mail : " + user.getEmail()); return response; } } *Following code we used to call MyApi from android application: * GoogleAccountCredential googleAccountCredential = GoogleAccountCredential.usingAudience(MainActivity.this, "server:client_id:" + WEB_CLIENT_ID); googleAccountCredential.setSelectedAccountName(SELECTED_ACCOUNT_NAME); MyApi.Builder myAPIBuilder = new MyApi.Builder(AndroidHttp.newCompatibleTransport(), new AndroidJsonFactory(), googleAccountCredential); myAPIBuilder.setGoogleClientRequestInitializer(new GoogleClientRequestInitializer() { @Override public void initialize(AbstractGoogleClientRequest<?> abstractGoogleClientRequest) throws IOException { abstractGoogleClientRequest.setDisableGZipContent(true); } }); myAPIBuilder.setRootUrl(ROOT_URL); MyApi myApi = myAPIBuilder.build(); MyBean myBean = myApi.sayHi(" Call From Android Application ").execute(); >>>> >>> -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/2f866104-ab41-4742-9999-6faf33e57859%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
