google-cloud-endpoints

App Engine Endpoints DOWN

主宰稳场 提交于 2019-12-03 21:47:06
I use Google Cloud Endpoints for my application. Whenever I hit the application root, it gives an error. The console says: Importing endpoints from google.appengine.ext is deprecated and will be removed. Add the endpoints library to app.yaml, then endpoints can be imported simply with "import endpoints". There is no mention of this in the documentation and I believe I am doing this correctly. I tried adding endpoints to the library section of app.yaml , but the deployment failed saying that it wasn't a valid library. When I look in the instance page, it says that my instances are running on

Endpoints stopped working with proxy.html error

╄→尐↘猪︶ㄣ 提交于 2019-12-03 21:40:43
Error I'm getting Refused to display 'ah/api/static/proxy.html?jsh=m%3B%2F%2">https://appname.appspot.com/ ah/api/static/proxy.html?jsh=m%3B%2F %2…8s_uMxLg#parent=http%3A%2F%2Fappname.appspot.com&rpctoken=....' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. Everything worked until yesterday. Started browser this morning to access app and got above message. Getting this on other endpoint apps too. Seems to fail when I access the endpoints to get info from the backend. Yes, Endpoints discovery seems to be failing, but it's on Google's side and not your code. Star this issue and get

Gradle failed: unsupported Gradle DSL method found: 'exclude()'

时光总嘲笑我的痴心妄想 提交于 2019-12-03 21:20:27
I'm trying to include into my Android project (Android Studio - latest, Gradle) the classes from the Google Endpoints (Python) that I recently coded. The server side is all tested and working. I'm not used to Gradle, therefore I'm following the documentation at Google Developers . After changing the build.gradle file under src (as instructed by the doc) to: build.gradle: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.9.+' } } apply plugin: 'android' repositories { maven { url 'http://google-api-client-libraries.appspot.com/mavenrepo' }

Cloud Endpoints Collection Parameter

血红的双手。 提交于 2019-12-03 21:04:00
问题 Im using Google App Engine Cloud Endpoints and Im trying to receive a collection parameter . Not sure if I can do this. I know I can return a List or any Collection. This: public List<Pair> initializationSetup(Pair pPair){} Works fine, but If I try to receive a list of pairs, the .api file is not created. public List<Pair> initializationSetup(List<Pair> pPairs){ Thanks 回答1: Cloud Endpoints only deals with classes having the bean standard. So, I created a new class named ObjectListContainer:

Is there a way to check if the user is an admin in AppEngine Cloud Endpoints

那年仲夏 提交于 2019-12-03 20:44:35
I am using AppEngine Cloud Endpoints with the Javascript client and Google+ Sign In, I am using endpoints.get_current_user() . Is there a way to check if the user is an AppEngine admin? Similar to users.is_current_user_admin() in users API. Thanks bossylobster See Google Endpoints API + Chrome Extension returns None for endpoints.get_current_user().user_id() for a long description of the difference between ID tokens and Bearer tokens when performing auth. If you aren't using an Android application, you can freely use Bearer tokens and not have to worry about some of the limitations of ID

Google Endpoints - Android GoogleAuthIOException Tic Tac Toe - Removed clientIds

爱⌒轻易说出口 提交于 2019-12-03 20:40:55
I downloaded the Google Endpoints Tic Tac Toe example - the server code in Java. Just to quickly run it up, I removed the clientIds from the API definition, so I could quickly see it working in the API Explorer: @Api(name = "tictactoe", version = "v1") public class ScoresV1 { ... I could run the following method just fine using the API Explorer, with OAuth turned on and authenticating with my gmail accoumnt. I could see the "user" object set to that account in the debugger: @ApiMethod(name = "scores.list") @SuppressWarnings("unchecked") public List<Score> list(@Nullable @Named("limit") String

Google Cloud Endpoints and JWT

自作多情 提交于 2019-12-03 17:29:53
I have an API based on Google Cloud Endpoints and I want to use JWT (Json Web Tokens) for authorization. I can set Authorization header for every request which contains token and it works correctly. I know that Endpoints uses this header for Oauth2 and here is my question. Is it correct to use Authorization header for custom token? GAE logs: D 12:38:44.375 Checking for id_token. D 12:38:44.376 id_token verification failed: Unexpected encryption algorithm: u'HS256' D 12:38:44.376 Checking for oauth token. D 12:38:44.384 Oauth framework user didn't match oauth token user. It looks like GAE tries

User Authorization for Cloud Endpoints

痞子三分冷 提交于 2019-12-03 17:11:58
I'm working on a cloud endpoints backend and want to restrict certain operations to admin users. My current code works like this: @ApiMethod(httpMethod = "PATCH", name = "item.update", path = "items") public Item update(Item newObject, User user) throws UnauthorizedException, OAuthRequestException { OAuthService oAuthService = OAuthServiceFactory.getOAuthService(); if (!oAuthService.isUserAdmin()) { throw new UnauthorizedException("Only admin users can modify content."); } ... } I know app engine has a concept of user roles, but I'm curious if Endpoints do. I've tried using the OAuthService

Using client library from Cloud Endpoints. jar import not working

六眼飞鱼酱① 提交于 2019-12-03 16:28:32
I'm created a jar file for my appengine (python) application. I've followed the steps to import my library (.jar) files from this example . It seems Android Studio imported everything correctly (no error) until I try to use the classes in the library. I started to open up the classes that are contained in the jar files to see if everything looked to be in order. This is what I found: UserMessage does not contain any errors. Can anyone help explain why the classes can't see/use each other? Is this an issue with the jar or Android studio? I had the same problem with Android Studio and Eclipse.

How to call a Google Cloud Endpoint from Google Apps Script?

你离开我真会死。 提交于 2019-12-03 16:23:32
How to call a Google Cloud Endpoint from Google Apps Script? There must be a supported way to do this. For example, you create an end point and you want to use it from Google Apps Script. The only thing I see is to use UrlFetchApp.fetch. But there must be a better way. Thanks. Unfortunately UrlFetchApp is the only supported way to call a Google Cloud Endpoints API at the moment. Please see our support page for more information on how file a feature request to add better support for Cloud Endpoints. 来源: https://stackoverflow.com/questions/22586148/how-to-call-a-google-cloud-endpoint-from-google