Pushbullet API: Delete Chat method returns Object not found - pushbullet

I receive a list of chat identifiers using /v2/chats endpoint.
When I try to delete a chat found in that list using the /v2/chats/{iden} endpoint I always receive a Object not found error.
My request:
curl --header 'Access-Token: TOKEN' --request DELETE https://api.pushbullet.com/v2/chats/IDENTIFIER
The Response:
{
"error" : {
"code":"invalid_request",
"type":"invalid_request",
"message":"Object not found",
"cat":"(^人^)"},
"error_code":"invalid_request"
}
}
This occurs with any chat identifier I try to use.
The "hide" chat menu item in the app (Android) does not remove the chat either.

I just tried this request and it seems to work fine. If you delete a chat which has already been deleted you get that error though.

Creating a Chat using the /v2/chats endpoint creates a chat that shows up when doing a list-chats call. However the chat is not marked as active and therefore it is not deletable until you send a message in the chat.

Related

FCM batch messages URL

I want send multiple notifications with one HTTP request to Firebase using REST API
Documentation says - "You should combine requests and send"
https://firebase.google.com/docs/cloud-messaging/send-message#send-messages-to-multiple-devices
curl command for send is
curl *** -H 'Content-Type: multipart/mixed; boundary="subrequest_boundary"' https://fcm.googleapis.com/batch
I found that https://fcm.googleapis.com/batch url is no longer supported https://developers.googleblog.com/2018/03/discontinuing-support-for-json-rpc-and.html
What right url for send multiple notifications to FCM?
There is a new API for sending messages through Firebase Cloud Messaging, called the versioned API. It lives on /v1/projects/<your-project-id>/messages:send and is fully documented in the Firebase documentation on sending requests.
In this new, versioned API sending multiple messages through the regular end point by sending a multi-part request to it. This process is fully documented in the section on sending a batch of messages and is also wrapped by most of the Admin SDKs that are available.

API call Trustpilot

I'm trying to send invitation link through our own system and use the API call to get invitation link.
I have received the TOKEN but now have problems when I try with API call to get invitation link.
Get the error "403"
Have you tried passing the API key as well as the token?
Add this header to the request:
apikey: [YOUR_API_KEY]
For context, here is the documentation.
https://developers.trustpilot.com/invitation-api#generate-service-review-invitation-link

Push notification support in Twilio IOS sdk

I'm trying to get push notifications on an app that's using Twilio IP Messaging. After following the instructions on twilio guides.
The AppDelegate functions to register for remote notifications is working well - the iOS devices successfully provides the device token to the Twilio Client. However, the TwilioIPMessagingClient gives no indication of success or failure while registering the token.I have used delegates also for that Moreover, I don't get any sign of push notifications when messages get sent.
I have checked logs also where I can see the correct logs:
TNNotificationClient | Starting registration..., id: <....>
TNRegTransport | Creating registration: apn - <....>
TNRegTransport | Registration is created, location: https://ers.us1.twilio.com/v1/registrations/<...>
Where exactly I'm missing? One hint I got to know after much research that in server PHP app, I need to enable push on IPMesaging services client becuase its disabled by default. If yes, where exactly or in which .php file I have to enable it?
Reference:
https://www.twilio.com/docs/api/ip-messaging/guides/push-notification-configuration
Someone else recently solved this problem realizing that they had not set the New Message notification type to be explicitly enabled as follows from the PHP example:
// Update the service webhooks
$service = $client->services->get("YOUR_IP_MESSAGING_SERVICE_SID");
$response = $service->update(array(
"Notifications.NewMessage.Enabled" => "true",
"Notifications.NewMessage.Template" => "A New message in ${CHANNEL} from ${USER}: ${MESSAGE}",
));
?>
Would this solve it for you?

instagram api OAuthPermissionsException live mode

I'm having an issues with the new API policy of Instagram
I already got my app approved and got basic permissions
IG API Permissions
When using the app on sandbox mode I can get API response only for my own user, however when I move to Live Mode and try using the API all I receive is error 400 code
For example
https://api.instagram.com/v1/users/search?access_token=MY-TOKEN&count=6&q=world
Response
{
meta: {
error_type: "OAuthPermissionsException",
code: 400,
error_message: "This client has not been approved to access this resource."
}
}
Even using the same API with my own username still getting the same error
I was trying to search on it but all I can find is the same error happens to unauthorized users
Any idea ?
I have fixed the This client has not been approved to access this resource Issue by Authorizing the Instagram public_content scope by visiting the following URL and clicking Authorize.
https://api.instagram.com/oauth/authorize/?client_id=[YOUR_CLIENT_ID]&redirect_uri=[YOUR_REDIRECT_URI]&scope=public_content&response_type=token
I found the reason, I can't use that endpoint because I have only permission for basic. for more information https://www.instagram.com/developer/endpoints/users/

How to set callback_url to facebook subscription to get facebook realtime updates using java graph api?

I have used the below link to set the subscription for facebook application:
https://graph.facebook.com/v2.2/MY_APP_ID/subscriptions?callback_url=MY_CALLBACK_URL?object=user&fields=feed&verify_token=MY_VERIFICATION_CODE&access_token=My_App_ID|MY_APP_SECRET
For this I am getting empty json object:
{
"data": [``
]
}
Please any one help me to set the subscription for my facebook application and to get the realtime updates from facebook.
It looks like you are sending a HTTP GET request instead of a HTTP POST request.
The HTTP GET request will return the subscriptions that app has, which seems to be none.
You need to first create a subscription to your callback_url by using a POST request instead.