How to move events from one Calendare to another (Different gmail)? - api

I am using calendar API to move the events from one Calendar to another totaly different gmail account and I am getting error.
404
- Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
When I am moving to secondary calendar on the same email no error is coming.
I have already gonethrough the doc which states I must have write permission for both calendar here how can I give permission using API.
Any example will be greatly appereciated.
Thanks,
Amit Singh

Related

Google Sheets - "The caller does not have permission" exception

I am using v4 and google/apiclient:2.9.1 (php).
I successfully access the spreadsheet through oauth2. It is meaning I can read and edit data. But sometimes I get 403 http code with a body
{
"error": {
"code": 403,
"message": "The caller does not have permission",
"errors": [
{
"message": "The caller does not have permission",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}
for no apparent reason. I don't change the permissions of spreadsheet, don't revoke permissions, etc. Re-access request is successful and the data becomes available again through API.
Why it happens? How do I get rid of the need to re-request access permissions?
This is repeated on different accounts and spreadsheets.

Google AUTH API Returning 500 Error

This endpoint call has always worked:
https://www.googleapis.com/oauth2/v2/userinfo
Nothing changed. But today around 12:30ET it gives us the following response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}
Google Services admins said they could not answer and to post here.
I saw a similar spike in 500s on login requests around the same time. It's possible it's just a random hiccup in their services. https://www.google.com/appsstatus#hl=en&v=issue&sid=22&iid=63152ed689097a6944dcdf3f15a12692 reports there was some temporary downtime logging into Hangouts for some users at around that same window -- might be the same thing.

Downloading a public shared file from Google Drive (encountering 500 error)

I run this request:
https://www.googleapis.com/drive/v3/files/1TcBDyugpHQSyUCLZcM0XtHOXo0S9Neh6asQUAYh54EM/export?mimeType=application%2Fpdf&key=[apiKey]
on this public file:
https://docs.google.com/document/d/1TcBDyugpHQSyUCLZcM0XtHOXo0S9Neh6asQUAYh54EM/edit
which is clearly exportable as PDF. I run this same query via Google's API explorer: Files: export
With whatever credentials it grabs, it tells me the response is 200 OK with application/pdf data. However, running the query manually in the browser gives me:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "internalError",
"message": "Internal Error"
}
],
"code": 500,
"message": "Internal Error"
}
}
I had a similar problem with a 400 using the normal File.get method:
https://www.googleapis.com/drive/v3/files/1TcBDyugpHQSyUCLZcM0XtHOXo0S9Neh6asQUAYh54EM?alt=media&key=[api key]
returning:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
Am I just doing something wrong? Any help appreciated!
API key is used for accessing PUBLIC data. Unless your file is set to public your not going get it using an API key. You will need to be authenticated using Oauth2 and use an access token
https://www.googleapis.com/drive/v3/files/1TcBDyugpHQSyUCLZcM0XtHOXo0S9Neh6asQUAYh54EM?alt=media&access_token=[token]
Error documentation:
400: Bad Request
User error. This can mean that a required field or parameter has not been provided, the value supplied is invalid, or the combination of provided fields is invalid.

I can not use Google Fusion Tables API

I'm trying to use the Google Fusion Tables API without success.
I created a table, set it to Public and I'm trying to access the API for my browser to this address:
https://www.googleapis.com/fusiontables/v1/query?sql=SELECT%20*%20FROM%201pheecBEHLRXeMA1cDSNGqhuXJ7srp9A3i1r3sdd6%20ORDER%20BY%20nome&key=my_key_access
But I always get this response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Forbidden"
}
],
"code": 403,
"message": "Forbidden"
}
}
My table has registered data
What can be happening?
You must also enable the download-option for the table to be able to request data via the Fusion Tables API

google plus api 403

For some reason I’m not getting the results that I expected using the HTTP POST explorer. I’m getting 403 Forbidden for all userIds that I try.
I used this article to be sure I'm using the correct userId (I even used the userID from the article to see if it was just the ones I tested).
This is where I'm testing: https://developers.google.com/apis-explorer/#p/plusDomains/v1/plusDomains.activities.list
Could there be something wrong with the API?
Here's the full response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Forbidden"
}
],
"code": 403,
"message": "Forbidden"
}
}
For the Plus Domain API, you need to make sure the user you're authenticating as is part of the domain you're making queries for. See https://developers.google.com/+/domains/authentication/ for more details.