google-api-php-client

How does Task->setLink work?

半腔热情 提交于 2019-12-08 03:15:13
问题 On the Google Tasks API website > Reference > Tasks > (https://developers.google.com/google-apps/tasks/v1/reference/tasks) scroll down to 'Resource Representations'. It looks like I can add a link to my tasks (like Gmail does when you set an email as a task). ApiTaskService.php also includes a class for that: TaskLinks . But when I try it, the added url just won't show up in the Task. Am I doing something wrong? What 'type' should I set the TaskLink to? Code: $linkid = array_push($links,new

How do I use Composer to setup google-api-php-client?

女生的网名这么多〃 提交于 2019-12-08 00:42:31
问题 There seems to be some gaps in the instructions, a little help? Step 1: Easily access Google APIs from PHP, sounds easy! Step 2: Install the library, you can install the library by adding it as a dependency to your "composer.json". Never heard of composer, never used json. All I need to do is add "require": {"google/apiclient": "1.0.*@beta"} to my composer.json Step 3: Composer requires Linux, but isn't the whole point of using App Engine so I don't have to deal with Linux? Ok, setup Debian

setAssertionCredentials on google-api-php-client 2.0

本小妞迷上赌 提交于 2019-12-07 19:37:00
问题 I updated from 1.1.5 to 2.0 and I cannot get it to login. I followed the UPGRADE.md instructions, on how to upgrade from using "setAssertionCredentials", but I can't get it to work. BEFORE: $client = new Google_Client(); $client->setApplicationName('API Project'); $client->setAssertionCredentials( new Google_Auth_AssertionCredentials( GAPI_SERVICE_ACCOUNT, array($service), file_get_contents(GAPI_KEYFILE) ) ); if ($client->getAuth()->isAccessTokenExpired()) { $client->getAuth()-

Signed URL for google bucket does not match signature provided

不打扰是莪最后的温柔 提交于 2019-12-07 18:17:11
问题 I'm having an hard time working with google storage. So I'm trying to make a signed url, already have the client id (which is an email) and private key (as described here) so: STEP 1: construct the string function googleBuildConfigurationString($method, $expiration, $file, array $options = []) { $allowedMethods = ['GET', 'HEAD', 'PUT', 'DELETE']; // initialize $method = strtoupper($method); $contentType = $options['Content_Type']; $contentMd5 = $options['Content_MD5'] ? base64_encode($options

You need to authorize access before proceeding

安稳与你 提交于 2019-12-07 13:53:12
问题 i'm trying to upload video on you tube using my application. i'm using google-api-php-client for uploading video <?php // Call set_include_path() as needed to point to your client library. set_include_path("google-api-php-client/src/"); require_once 'Google/autoload.php'; require_once 'Google/Client.php'; require_once 'Google/Service/YouTube.php'; session_start(); /* * You can acquire an OAuth 2.0 client ID and client secret from the * {{ Google Cloud Console }} <{{ https://cloud.google.com

Unsupported content with type: multipart/form-data in google plus api oauth2

一个人想着一个人 提交于 2019-12-07 11:38:41
问题 I am trying to sign in with google plus Api in my web app. I searched on it from https://developers.google.com/oauthplayground/https://developers.google.com/oauthplayground/ and I applied them. When I request to https://www.googleapis.com/oauth2/v3/token , it returns { "error": "internal_failure", "error_description": "Unsupported content with type: multipart/form-data; boundary=----------------------------5dd1639f2986" } I am putting my code snippets which are doing the request (as client id

PHP Youtube API v3 - Direct Upload - Unauthorized message

丶灬走出姿态 提交于 2019-12-07 10:14:06
问题 I'm trying to direct upload videos to Youtube with API v3. I'm using service account scenario (https://developers.google.com/accounts/docs/OAuth2?hl=es&csw=1#scenarios), and I solved some problems in the google-api-php-client library (to read the p12 file and to avoid the isAccessTokenExpired always return false). <?php /** Config */ $private_key_password = 'notasecret'; $private_key_file = 'xxxxxxxx-privatekey.p12'; $applicationName = 'xxxxx-youtube'; $client_secret = 'CLIENT_SECRET';

get raw rfc822 message from phpmailer

你。 提交于 2019-12-07 05:00:35
问题 I am trying to use google-api-php-client and gmail-api to allow my users to authenticate their gmail accounts and send emails through my website. I asked a more generic questions earlier and decided to seek help from the PHPMailer community with this question. I have used PHPMailer to send emails. And I want to know if I can extract the raw rfc822 message from my PHPMailer object after setting it up prior to sending. I should be able to then do a base64_encode on that string and set the "raw"

How does Task->setLink work?

十年热恋 提交于 2019-12-07 02:04:28
On the Google Tasks API website > Reference > Tasks > ( https://developers.google.com/google-apps/tasks/v1/reference/tasks ) scroll down to 'Resource Representations'. It looks like I can add a link to my tasks (like Gmail does when you set an email as a task). ApiTaskService.php also includes a class for that: TaskLinks . But when I try it, the added url just won't show up in the Task. Am I doing something wrong? What 'type' should I set the TaskLink to? Code: $linkid = array_push($links,new TaskLinks())-1; $links[$linkid]->setType("website"); $links[$linkid]->setLink($issue_url); $links[

adding an event to google calendar using php

扶醉桌前 提交于 2019-12-06 14:40:42
I'm working on a client web app where users can book drives with date, time, location...etc the client required that every booking is added as an event on his google calendar I created an API key and downloaded the PHP API client: https://github.com/google/google-api-php-client But when I try to add an event I get a "Login Required" Error How can I add an event directly without having to use OAuth and consent screen because the function will be executed automatically in the backend, I have full access to the gmail account. I got it to work using a service account and some steps based on this