google-api-client

Sharing credentials between Drive SDK v.2 and Google Drive Android API

耗尽温柔 提交于 2019-12-23 03:16:18
问题 here's yet another pit a fell into when trying to implement the new Google Drive Android API (GDAA): Activity A of my app needs functionality not supported by GDAA, so I resort to using the original Google Drive SDK v2 per the statement here.: In some cases, applications may need to use the Google Drive web service to access additional features or access broader scopes than what is available in the Google Drive Android API. In these cases, your application must use the Google APIs Client

Sharing credentials between Drive SDK v.2 and Google Drive Android API

半世苍凉 提交于 2019-12-23 03:15:02
问题 here's yet another pit a fell into when trying to implement the new Google Drive Android API (GDAA): Activity A of my app needs functionality not supported by GDAA, so I resort to using the original Google Drive SDK v2 per the statement here.: In some cases, applications may need to use the Google Drive web service to access additional features or access broader scopes than what is available in the Google Drive Android API. In these cases, your application must use the Google APIs Client

FusedLocationApi with PendingIntent is fired only once and its null

空扰寡人 提交于 2019-12-23 02:42:20
问题 Am working on an app that needs location update frequently even when its in the background. Following the documentation here, am working with pending intent not locationlistener. My code is below /** * Created by philip on 7/30/16. */ public class LocationService extends Service implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener{ private GoogleApiClient mGoogleApiClient; private LocationRequest mLocationRequest; public static final long UPDATE_INTERVAL

Faraday conflicts in google_drive and google-api-client

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 12:58:15
问题 I'd like to be able to use both the google-api-client gem to do service to service authentication and the google_drive api to access spreadsheets. Unfortunately, these gems seem to conflict due to requiring different versions of Faraday in their dependencies. Anyone know how to solve this? Error if google_drive is required first: specification.rb:1637:in `raise_if_conflicts': Unable to activate google-api-client-0.4.4, because faraday-0.8.1 conflicts with faraday (~> 0.7.0) (Gem::LoadError)

Google Youtube API Insert Comment always returns error response 403 - “Insufficient Permission” - domain “global”

我的梦境 提交于 2019-12-22 12:39:15
问题 I followed the docs and code samples from documentation guide i.e., here: https://developers.google.com/youtube/v3/docs/commentThreads/insert But when I execute the script it always returns a response with error code: 403 message: "Insufficient Permission" Here's complete response object: { "error": { "errors": [ { "domain": "global", "reason": "insufficientPermissions", "message": "Insufficient Permission" } ], "code": 403, "message": "Insufficient Permission" } } I spent alot of time in

How to create new google alert delivering it to feed, using PHP cURL

痴心易碎 提交于 2019-12-22 10:39:15
问题 All i need - it is create google alert connected to my account, which should be delivered to my feed. For auth i'm using curl function googleAuthenticate($username, $password, $source, $service = 'alerts') { $session_token = $source . '_' . $service . '_auth_token'; if (isset($_SESSION[$session_token])) { echo 'уже есть'; return $_SESSION[$session_token]; } // get an authorization token $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.google.com/accounts/ClientLogin"); $post

Can't Validate Google Access Token (wrong number of segments)

倖福魔咒の 提交于 2019-12-22 08:17:54
问题 I have very simple code directly from Google's website $client = new Google_Client(['client_id' => $CLIENT_ID]); $payload = $client->verifyIdToken($id_token); if ($payload) { $userid = $payload['sub']; echo $userid; } else { // Invalid ID token echo "error"; } I get the following error(s): <b>Fatal error</b>: Uncaught exception 'UnexpectedValueException' with message 'Wrong number of segments' in /../vendor/firebase/php-jwt/src/JWT.php:79 Stack trace: #0 /../vendor/google/apiclient/src/Google

GoogleNetHttpTransport.newTrustedTransport() returning Null

巧了我就是萌 提交于 2019-12-22 07:29:10
问题 I'm trying to load Google credential from json file. So before that, I knew, we have to get the default Google transport. Ref from. But it always gives null . Is anybody faced this issue? This is my snippet: try { JSON_FACTORY = JacksonFactory.getDefaultInstance(); HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport(); } catch (Throwable t) { Utilities.writeToLogFile(Constants.LOG_ERROR_LEVEL, ".. EXCEPTION" + t.toString()); } This always ends with catch part. says as below ...

Check whether the user is already logged in using Auth.GoogleSignInApi?

时间秒杀一切 提交于 2019-12-22 05:13:59
问题 I fount that in order to sign in the user I have to use this code: Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient); startActivityForResult(signInIntent, RC_SIGN_IN); to signout new ResultCallback<Status>() { @Override public void onResult(Status status) { disconnect(); } }); But when the user relaunch the app and he is already logged in (and no sign out before) is it possible to detect this 'currently logged in' state? Obviously, it is possible to save 'logged in'

nodejs googleapis, authClient.request is not a function

岁酱吖の 提交于 2019-12-22 03:34:00
问题 I am creating an oauth2client in one function like so and returning it. I actually do pass in the clien id, secret, redirect url, and credentials. Those are all correct from what I have checked. var OAuth2 = google.auth.OAuth2; var oauth2Client = new OAuth2(CLIENT_ID, CLIENT_SECRET, REDIRECT_URL); ... credentials = { access_token: accessToken, refresh_token: refreshToken }; oauth2Client.setCredentials(credentials); I then do this in the function where the oauth2client object is returned: var