How to create unpublished page post for video using Ads api and what are the params required for create video unpublished pagepost? - facebook-ads-api

Iam Using facebook ads Api. i want crate a unpublished page post for video. the Graph apireturns error as follows
{
"error": {
"message": "(#353) You must select a video file to upload.",
"type": "OAuthException",
"code": 353
}
}
any solution for that?
Thanks in Advance

Change service call from ← https://graph.facebook.com/ to ← https://graph-video.facebook.com/
then it will Works fine

Related

Teams file consent card not sending "accept" activity to bot handler while implementing Teams Bot API , it is showing went wrong

We have a Teams bot installed for internal company use and it is capable of sending files to our users. Our application that handles the bot does not receive the file consent allow activity but decline activity is working fine , as said in the documentation we have implemented it .
will you pls help me out with the issue .
I'm using the proper documentation of Microsoft teams passing these values but not getting the result.
attachments": [{
"contentType": "application/vnd.microsoft.teams.card.file.consent",
"name": "result.txt",
"content": {
"description": "Text recognized from image",
"sizeInBytes": 4348,
"acceptContext": {
"resultId": "1a1e318d-8496-471b-9612-720ee4b1b592"
},
"declineContext": {
"resultId": "1a1e318d-8496-471b-9612-720ee4b1b592"
}
}
}]

Can't download reference attachment from MS graph API

I'm using graph API mentioned below -
"client.api(/users/${data_body.payload.originEmail}/messages/${data_body.payload.emailId}/attachments/${data_body.payload.attachmentId}/$value).getStream()"
it works fine for me if attachment type is "fileattachment" but this api is not working in case of "referenceattachment"
also I went through the documentation it says that "Attempting to get the $value of a reference attachment returns HTTP 405."
and it does not return contentBytes
enter image description here
site to refer - https://learn.microsoft.com/en-us/graph/api/attachment-get?view=graph-rest-1.0&tabs=http
1: https://i.stack.imgur.com/fGrft.png
does anyone have any solution to get content data of reference attachment. if yes it would be great help !! Thanks in advance
GET /drive/items/{item-ID}?select=id,#microsoft.graph.downloadUrl
response =>
click to open
Here you can see downloadURL is missing in response
The graph v1.0 endpoint doesn't have any support for reference attachments (other then showing you that one existing on an email). You need to switch to the beta endpoint which will provide the sourceUrl of the attachment in question eg
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/referenceattachment
eg
https://graph.microsoft.com/beta/me/mailfolders/inbox/messages/..AA=/attachments/AAM..
would give you something like
{
"#odata.context": "https://graph.microsoft.com/beta/$metadata#users('..')/mailFolders('inbox')/messages('..')/attachments/$entity",
"#odata.type": "#microsoft.graph.referenceAttachment",
"id": "..",
"lastModifiedDateTime": "2022-04-11T23:53:54Z",
"name": "User1.text",
"contentType": "application/octet-stream",
"size": 565,
"isInline": false,
"sourceUrl": "https://..-my.sharepoint.com/personal/.._com/Documents/Attachments/User1.text",
"providerType": "oneDriveBusiness",
"thumbnailUrl": null,
"previewUrl": null,
"permission": "other",
"isFolder": false
}
You then need to take the sourceURL and download that via the applicable API for the reference attachment. eg in this example its Sharepoint so you can use the SharePoint API to download the file.

Youutbe api v3 save video to playlist

I am looking for a way to save video to a custom playlist on Youtube. Youtube offers this option in their browser, below the video you can click "save" button and popup will open where user can choose where to save a video. Is there an api equivalent of that?
I am searching their api documents but not sure where to look.
https://developers.google.com/youtube/v3/docs/videos
It seems you are looking for PlaylistItems: insert by specifying part=snippet and request body to:
{
"snippet": {
"playlistId": "YOUR_PLAYLIST_ID",
"position": 0,
"resourceId": {
"kind": "youtube#video",
"videoId": "YOUR_VIDEO_ID"
}
}
}

Youtube Data API v3 nextPageToken not working

So I've just started to use the Youtube Data API to get comments from youtube videos. My program has been working until I tried to use the next page token to get more comments. So it first calls the normal URL without the &pageToken=***and then the next time it loops back it calls it with that but returns an error
{
"error": {
"errors": [
{
"domain": "youtube.parameter",
"reason": "invalidPageToken",
"message": "The request specifies an invalid page token.",
"locationType": "parameter",
"location": "pageToken"
}
],
"code": 400,
"message": "The request specifies an invalid page token."
}
}
My program, when calling the first time would get the key returned and save it in a variable for the next time it calls the new url. Yes, I have verified that my variable holds a key. Any help would be greatly appreciated! Thanks in advance :D
You forget playlistId it's required , example :
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=3&playlistId=PLw6Y5u47CYq47oDw63bMqkq06fjuoK_GJ&pageToken=EAAaBlBUOkNBTQ&key=['api_key']&nextPageToken=EAAaBlBUOkNBTQ
take a look on api documentation

Error while creating Sales Order with "API_SALES_ORDER_SRV"

we want to create a Sales Order with Cloud SDK (Version 1.9.2) using Virtual Data Model (A_SalesOrder) in our Java Application.
We are calling S4 OnPremise System (1709).
SalesOrder so = SalesOrder.builder()
.salesOrderType("ZKE")
.salesOrganization("DE01")
.distributionChannel("01")
.organizationDivision("00")
.build();
try {
SalesOrder salesOrder = new
SalesOrderCreateFluentHelper(so).execute(endpoint);
} ....
We are getting the following error (while executing via PostMan):
"errordetails": [
{
"code": "CX_SADL_ENTITY_SRVICE_NOT_SUPP",
"message": "The requested service is not supported by entity ~A_SALESORDER",
"propertyref": "",
"severity": "error",
"target": ""
},
{
"code": "/IWBEP/CX_MGW_MED_EXCEPTION",
"message": "An exception was raised",
"propertyref": "",
"severity": "error",
"target": ""
}
]
Can somebody give us a advise to create a Sales Order via the API?
How we can create Sales Order Items for this Sales Order in one Step?
Thanks!
Additional information OData Request Data
(Response Data not provided in ERROR_LOG):
Request-Header / Request-Body:
Apparently we received this error message because we did not include any items in the request. If you give it in your body it worked. Thank you
Can you pls share the OData request and response body and payload?
Open transaction /IWFND/ERROR_LOG, choose the error message and in the lower part of the screen, choose Request Data resp. Response Data and provide us both body and header. Make sure to omit any confidential data.

Resources