I'd like to send a file to the user, to do so I tried the request below, but it fails.
The docs are not clear about wether is_reusable is compulsory, but the request fails with the same error, even if I include it.
The download url works fine in a browser.
I have https://asd.com/ whitelisted for sure.
Request:
{
"recipient": {
"id": "157..."
},
"message": {
"attachment": {
"type": "file",
"payload":
{
"url":
"https://asd.com/s3/..."
}
}
}
};
Response: HTTP 500
{
"error": {
"code": 1,
"message": "An unknown error occurred",
"error_subcode": 99
}
}
The issue is resolved now. I didn't touch the code, so probably it was an error on Facebook's side, as #Josh Cole and HTTP 500 suggested.
Recently they making quite a few breaking changes... Few days ago they broke all the web views, now the files, whats next?
I'm marking this question solved.
Related
I am trying to work with a cron job on GCP Cloud Scheduler. I am using the HTTP target with the "GET" method.
I am trying to post messages to a discord channel but first need to GET the body my server webhook sends back to me. The CRON job runs successfully but I cannot find the body of what the webhook returned on the GCP Cloud Scheduler. I have checked the logs as well, it does not contain the body. Here is what the log has:
{
"insertId": "a06j1cfzy21xe",
"jsonPayload": {
"targetType": "HTTP",
"jobName": "projects/website-274422/locations/us-central1/jobs/discord_sec_bot",
"url": "https://discordapp.com/api/webhooks/<redacted>/<redacted>",
"#type": "type.googleapis.com/google.cloud.scheduler.logging.AttemptFinished"
},
"httpRequest": {
"status": 200
},
"resource": {
"type": "cloud_scheduler_job",
"labels": {
"project_id": "website-274422",
"job_id": "discord_sec_bot",
"location": "us-central1"
}
},
"timestamp": "2020-08-10T21:42:13.290867117Z",
"severity": "INFO",
"logName": "projects/website-274422/logs/cloudscheduler.googleapis.com%2Fexecutions",
"receiveTimestamp": "2020-08-10T21:42:13.290867117Z"
}
Could anyone tell me where I could find what my GET request received?
Although it's not mentioned directly in the documentation I don't think it's possible to see this. I am not sure what do you want to do, however if you need any information to pass to the logs you can use response status. I have done quick test on my cloud function, which was randomly sending response status from 200 to 204.
For each job I get 2 different log items. In the 2nd one there is following field with random status:
httpRequest: {
status: 201
}
According this is only chance to see anything returned by the endpoint to logs. You can use this status to code some information.
I am trying to make use of Facebook Server-Side API to send pixel events from my server. I'm making a POST request to this endpoint:
https://graph.facebook.com/v6.0/509380299968653/events?access_token=<SYSTEM_USER_ACCESS_TOKEN>
and sending this payload:
data:[
{
"event_name": "PageView",
"event_time": 1586978506,
"user_data": {
"fbc": "fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
"fbp": "fb.1.1558571054389.1098115397"
}
}
]
,
"test_event_code":"TEST13699"
However, I'm getting an error response from the facebook server:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (events) on node type (AdsPixel)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "AaqSg_DnGvvpjI3cWCK1yPU"
}
}
Need help to figure out what I'm doing wrong.
https://forge.autodesk.com/blog/how-patch-apis-work-and-some-tips-using-patch-apis
https://forge.autodesk.com/en/docs/data/v2/reference/http/projects-project_id-versions-version_id-PATCH/
I have followed the two links above explaining how to PATCH a version of an item and update the name of it but I am getting errors. Below is what I inputted into Postman (version_id inside the URI has been already encoded):
URI: https://developer.api.autodesk.com/data/v1/projects/:project_id/versions/:version_id
Authorization: Bearer *****************************
Content-Type: application/vnd.api+json
Body:
{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "versions",
"id": *********************************************,
"attributes": {
"name": "AAA - My PDF file.pdf",
"displayName": "AAA - My PDF file.pdf"
}
}
}
The item version I am trying to update is already named AAA - My PDF file.pdf so nothing should be updated. But when I send the request I get the following error.
Error:
{
"jsonapi": {
"version": "1.0"
},
"errors": [
{
"id": "30043cce-cfbe-4766-933c-fd9d888e574d",
"status": "400",
"code": "BAD_INPUT",
"title": "One or more input values in the request were bad",
"detail": "Request input is invalid for this operation."
}
]
}
Are there any ideas why I am getting this error and how can I fix it?
Unfortunately at the moment PATCHing for BIM360 Doc items is unsupported and hence the error. The error message could have been more specific rather than a general validation failure message and I will let Engineering know to update accordingly.
Try PATCHing with A360 hub and it should work as expected.
I am trying to get comments for some business account by using business discovery node. I can load list of media with the request
GET
https://graph.facebook.com/v3.1/17841402914723639?fields=business_discovery.username(bluebottle){followers_count,media_count,media{media_type,comments_count}}
This returns
{
"business_discovery": {
"followers_count": 297515,
"media_count": 1317,
"media": {
"data": [
{
"media_type": "IMAGE",
"comments_count": 18,
"id": "17970528943031455"
},
{
"media_type": "IMAGE",
"comments_count": 17,
"id": "17938949563163035"
},
{
"media_type": "IMAGE",
"comments_count": 66,
"id": "17966264041064104"
},
I assume the id in the media entry is an id for that object. But when I am trying to access it like
GET https://graph.facebook.com/v3.1/17970528943031455
I got an error
{
"error": {
"message": "Unsupported get request. Object with ID '17970528943031455' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "HbaasWNQ8ko"
}
}
Is it permission problem?
How can I get list of comments for a media?
According to the documentation: "An access token from a User who created the IG Media object, with the following permissions:" means that you need to have access permission granted by the owner of the post to have access to its comments.
The syntax of the query is :
business-account-id?fields=business_discovery.username(bluebottle){media{comments}}
But when I tried that I got this error :
{
"error": {
"message": "(#100) Please read documentation for supported fields.",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "BFuJQt0/Kt3"
}
}
So I'm guessing they have removed the support for fetching the comments.
You can only get comments if you have a valid authentication token for the account you are querying. You would use the /media or <media_id>/comments endpoint to get comments, insights, etc:
Media endpoint
/MY_IG_BUSINESS_ACCOUNT_ID/media?fields=id,caption,comments_count,children{media_url},comments.limit(50){id,timestamp,username,text},insights.metric(impressions,reach,engagement,saved,video_views)&limit=30
Comments endpoint:
/<MEDIA_ID>/comments/?fields=created_time,from,message,like_count&limit=50
Since a few days back, we keep getting this error when trying any patch request to the Groupssettings API. It happens every time, and not sporadically which would often be the case with backend errors. Are there issues with the API? It worked before the weekend, and has done for some time before this... I get the same result through our code and through the "Try it now!" on the developer reference page: https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups/patch#try-it
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "A system error has occurred"
}
],
"code": 503,
"message": "A system error has occurred"
}
}