Google People API updateContact, batchCreateContacts and batchUpdateContacts throwing Errors - rest

The new Google People APIs
batchCreateContacts - https://developers.google.com/people/api/rest/v1/people/batchCreateContacts and batchUpdateContacts - https://developers.google.com/people/api/rest/v1/people/batchUpdateContacts gives following response on making a request.
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
updateContact - https://developers.google.com/people/api/rest/v1/people/updateContact gives the following response when CalendarUrl is sent in the update contact request
{
"error": {
"code": 400,
"message": "Invalid updatePersonFields mask path: \"calendar_urls\". Valid paths are documented at https://developers.google.com/people/api/rest/v1/people/updateContact.",
"status": "INVALID_ARGUMENT"
}
}
Can someone help with these issues.

Related

What does Facebook error code "-1" subcode "2018012" error_key "E-1_S2018012"mean?

I received this error from Facebook, for a specific guest user:
"message": "[FacebookClient] response",
"status": 400,
"request": {
"baseURL": "https://graph.facebook.com/v8.0/",
"url": "/me/messages?access_token=EAAT9ZAq9Nm..."
},
"data": {
"error": {
"message": "(#-1) Unexpected internal error",
"type": "OAuthException",
"code": -1,
"error_subcode": 2018012,
"fbtrace_id": "AJcFpXZa28zOMut3XAUxorW"
}
},
....
"error_key": "E-1_S2018012"
Facebook documentation did not mention anything about this error. And very few info from Internet with reasons (not encode as unicode, send same payload messages in same time and timezone) that are not applicable to me.
Pls help me what it is and how to solve? Thank a lot!

Facebook graph api filtering nested object

How to filter by creativeid on Ads using facebook graph api.
I tried below query but it is not working.
act_xxxxxx/ads?fields=creative{id}&filtering=[{field: "creative",operator:"EQUAL", value:"id_of_creative"}]
act_xxxxxx/ads?fields=creative{id}&filtering=[{field: "ad.creative.id",operator:"EQUAL", value:"id_of_creative"}]
act_xxxxxx/ads?fields=creative{id}&filtering=[{field: "creative.id",operator:"EQUAL", value:"id_of_creative"}]
But for all above response is
{ "error": { "message": "(#100) Filtering field 'creative.' with operation 'equal' is not supported", "type": "OAuthException", "code": 100, "error_data": "An unknown error occurred", "fbtrace_id": "AlWsddsx" } }

How to create a BigQuery View using REST request

I've tried building and sending the REST request using the Google Tables: insert page with the following (sanitised) values:
Request parameters
projectId:prj-name
datasetId:dataset_name
Request body
{
"view": {
"useLegacySql": false,
"query": "SELECT * FROM `prj-name.dataset_name.hello_world`"
},
"type": "VIEW",
"tableReference": {
"projectId": "prj-name",
"datasetId": "dataset_name",
"tableId": "v_hello_world"
}
}
This post suggests these parameters should work, but Google returns the following response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Output field used as input"
}
],
"code": 400,
"message": "Output field used as input"
}
}
I've experimented with the REST properties and I think the 400 issue is caused by the inclusion of the tableReference property. But if I exclude it I get the following alternative error:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Required parameter is missing"
}
],
"code": 400,
"message": "Required parameter is missing"
}
}
It's a shame that the "Required parameter" is not named in this error message!
I can use this code method to create the view but that code method throws an exception when patching views.
Help is appreciated. I'd rather not have to maintain two different ways of managing views in my code.
Thanks.
Remove "type": "VIEW", from your request.
That's not an input parameter. It's an output field from the response.
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#resource

How to delete a facebook marketing lead form using graph api

According to the facebook documentation here Deleting a Lead Form
this is how you do it:
Send a delete http request to https://graph.facebook.com/v2.10/formId?access_token=the_access_token.
However I get the error below when I try the above:
{
"error": {
"message": "(#210) This call requires a Page access token.",
"type": "OAuthException",
"code": 210,
"fbtrace_id": "ABC123/xyz"
}
}
When I use a Page access token (as suggest by the error response) this is what I get:
{
"error": {
"message": "(#3) Subject must be on whitelist",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "IJK123/uvw"
}
}
If it matters the accessToken initially used is the same token used to create the leadform.
How can I get this to work? What am I missing?

Google cloud storage client api not working for patch

I tried updating header of an object by using API explorer (as well as client library) by giving metadata object as header keys and values.
I only received error respond
{
error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid argument."
}
],
"code": 400,
"message": "Invalid argument."
}
}
The request is:
PATCH https://www.googleapis.com/storage/v1beta2/b/mbi-figure/o/infovilla_paypal.png?key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29
X-JavaScript-User-Agent: Google APIs Explorer
{
"metadata": {
"title": "Kyaw"
}
}
You've run into a bug with PATCH that is being worked on. Fortunately, there's a workaround. Adding a "projection=full" parameter to the URL should fix your problem.