I'm using a Connected App. this is subscribed to a custom notification (0ML)
i am using the SF standard API: POST /services/data/v54.0/actions/standard/customNotificationAction
with this payload:
{ "inputs" : [
{ "customNotifTypeId" : "0ML1v000000GmaiGAC", "recipientIds" : ["0051v000004exBLAAY"], "title" : "opportunity Closed!", "body" : "Your High Priority Opportunity has been Closed. 27th 14:23", "targetId" : "0WO3N0000016T3cWAE" } ] }
this works fine, i get status code 200, and i also see the notification in salesforce itself in the console, but when i use this API: GET /services/data/v49.0/connect/notifications i get an empty array
Other places on the internet mention that
The API uses the context of the requesting connected app and returns notifications for the appropriate types.
but I do not understand what this means.
Best Answer
Per the documentation ,
Make sure your connected App is subscribed to related custom notifications under Mobile App Settings as mentioned in doc. Workbench is not an officially supported tool so after the custom notification is triggered, you can try to make GET with the below snippet in Dev console