Trying to make a call to linkedin api https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives-new?view=li-lms-2022-10&tabs=http#delete-a-creative
to delete a creative however am receiving a 500 error
{
"code": "GATEWAY_INTERNAL_ERROR",
"message": "Gateway Internal Error"
}
body of the request is:
"patch": {
"$set": {
"status": "PENDING_DELETION"
}
}
}
as per the documentation passed the header
X-RestLi-Method
as
DELETE
The issue was field name
"intendedStatus": "PENDING_DELETION"
Related
I m trying to use postman
link:https://graph.facebook.com/v6.0/me/messages?access_token=my_token
{
"get_started":{
"payload": "Hi, I am bot"
}
}
in raw JSON body
but getting this response
{
"error": {
"message": "(#100) Tried accessing nonexisting field (messages) on node type (Page)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "AtFh2_fJ2sxkeU8k-2aNJGl"
}
}
Here is the little rundown how to put get started button , I hope its help:
Using postman:
Start by changing the type by choosing a POST request: (one of the
problems that solve my issue thanks to #misorude
Define a Post request to this URL:
https://graph.facebook.com/v6.0/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>
As #misorude notice my another problem check endpoint from here https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api
In the BODY section:
.
Paste this code:
{
"get_started":{
"payload": "Hi, I am bot"
}
}
P.S.
Thank you again
I'm able to successfully create an annotated tag (git tag) with the request below, but I'm not able to programmatically delete it.
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/annotatedtags?api-version=4.1-preview.1
Request:
{
"name": "wagner-test-3",
"message": "wagner-test-3",
"taggedObject": {
"objectId": "aaaaab6cad84a07b7bd65cf3519142a12f856baa"
}
}
According to the documentation there is no delete endpoint, so I've tried the delete ref endpoint but no luck so far. It only returns 400 (Invalid Request).
DELETE https://dev.azure.com/{organization}/{project}/_apis/git/favorites/refs/{favoriteId}?api-version=4.1-preview.1
Response:
{
"count": 1,
"value": {
"Message": "The request is invalid."
}
}
Thanks.
I was able to figure out my own question. The way to delete an annotated tag is to update it with the Refs API. This is not well documented though.
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?api-version=4.1
Request:
[
{
"name": "refs/tags/wagner-test-3",
"newObjectId": "0000000000000000000000000000000000000000",
"oldObjectId": "aaaaab6cad84a07b7bd65cf3519142a12f856baa"
}
]
Azure DevOps documentation:
Refs - Update Refs
Creating, updating, or deleting refs(branches).
Login seems to go ok, with the email permission,
however when doing:
var deferred = $q.defer();
$openFB.api({
path: '/me/email'
}).then(function( res ) {
deferred.resolve(res);
//angular.extend(me, {picture: res.data.url});
}).catch(function(err){
console.log(err);
deferred.reject(err);
});
I get an error wrong path.
Ben
/me/email is not a valid endpoint. This is how you get the email of a user: /me?fields=email
The error (from the API Explorer):
{
"error": {
"message": "Unknown path components: /email",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "FBdZx0Yntxz"
}
}
I'm trying to automatically add a comment to a page in confluence using the REST API.
I am testing using Postman, im pointing at this url: https://###########.atlassian.net/wiki/rest/api/content/
using valid headers, and posting this json:
{
"type":"comment",
"container":"72025106",
"body":{
"storage":{
"value":"auto comment 1",
"representation":"storage"
}
}
}
When I do i get this error back:
{
"statusCode": 500,
"message": "java.lang.IllegalStateException: Must provide id and type for Content"
}
this should work:
{"type":"comment",
"container":{
"id":"[PARENT_ID]",
"type":"page",
"status":"current"
},
"body":{
"storage":{
"value":"[COMMENT_BODY]",
"representation":"storage"
}
}
}
i'm trying to send some likes on facebook page post but for firstt time i notice that error and don't know the reason
request:
https://graph.facebook.com/479322648852908/likes?access_token=CAAEYj0oZAmMsBAHmBWezCtiPfBZAHnOTyzblZB1YxvBbXFZC88ybqS2LlNTwWdsKRECdqZC7A1WEnSVqZCSlt0ftAs8YYmrLtJurIfd5BIotlf1DdMymD1ZBBF9ayYlLrCs1h7JHkRP6PZBv6M2oQpjWVoKPYTufdgdagto3blt2styL2XpYFBsVdmwlmNEQOBwZD&method=POST
Response:
{
"error": {
"message": "(#1) An unknown error occurred",
"type": "OAuthException",
"code": 1
}
}
Any hint ?
I think you can get away without the access token via the url:
http://graph.facebook.com/479322648852908/likes