Hi Guys,
Does anybody could provide me some advices about how to use API Action to do a POST API.
I’m testing OneSignal (with a production account and my own Player ID) - and would like to send a test notification to a specific user (me).
I’m getting nuts, i don’t understand how to set correctly my Server Connect API Action correctly (input, header, schema, and different options).
(I’ve read every posts, topics, docs + tutos since yesterday before asking for help…)
Many thanks.
Sylvain
Here’s how I post to Onesignal:
The auth header should evaluate to:
Bearer YOUR-TOKEN
The JSON Data I use is:
{
"include_player_ids": "{{onesignal_player_ids}}",
"contents": {
"en": "{{notification_text}}"
},
"headings": {
"en": "{{notification_title}}"
},
"data": {
"meal_plan_id": "{{$_PARAM.meal_plan_id}}"
},
"ios_attachments": {
"id": "{{image_url}}"
},
"big_picture": "{{image_url}}",
"app_id": "{{tenant.onesignal_app_id}}"
}
The {{onesignal_player_ids}}
evaluates to an array of onesignal id values.
Optional data
values are passed along to the app (in my case the user is deeplinked using this id).
2 Likes
Thanks @mebeingken for your help.
I’ll try this way.
This works perfectly!
Many many many thanks
Hi!
@mebeingken any advice on how to get the PID on logging in?
Many thanks.