Sending a push notification By API
Using the push API to send Swing2App push notifications.
Swing2App provides the following method to send push messages sent from the dashboard in the form of APIs.
In the case of API use not agreed in advance and indiscriminate mass shipment, the use may be restricted.
This API is available to users of paid apps.
API Specification
API for sending push notification to Swing2App application
POST
https://www.swing2app.com/swapi/push_send
*** App ID and API KEY that need to be issued can be issued upon request to the customer center. **
Request Body
Name | Type | Description |
---|---|---|
app_id* | APP_ID provided by Swing2App | |
api_user* | Swing2app user account (email address) | |
api_key* | String | API KEY provided by Swing2App |
send_target_list* | String | Send destination type setting items When sending to indiviUser ID to send to user_id in single dispatch When sending multiple messages, separate them with “,” Ex:) user_id1,user_id2 Enter -1 [When sending all ] Ex:) -1 |
send_target_type_list* | String | Send destination type setting items When sending to individual users, input MEMBER as many as the number, separate them with ‘,’ If sending to all. enter 'ALL_TARGET' [When sending to 2 specific users] Ex:) MEMBER, MEMBER [When sending to all] Ex:) ALL_TARGET\ |
send_type* | String | Enter the send type. Enter "push" in case of push delivery |
message_json* | String | * Enter the following variables according to the JSON format string\ messageTitle: Title, messageContent: Content messageLinkUrl: Link Address messageImageUrl: Image Url *Can be omitted if there is no link address and image address Ex:) [In case of sending title, content, link, image] {“messageTitle" : "title" , "messageContent" : "content" , "messageLinkUrl" : "https://www.swing2app.com" , "messageImageUrl":"https://www.swing2app.com/abc.png"}\ [In case of sending only the title, content, and image] {“messageTitle" : "title" , "messageContent" : "content" , "messageImageUrl":"http://www.swing2app.com/abc.png"}\ [In case of sending only the title, content] {“messageTitle" : "title" , "messageContent" : "content" } |
Code example
[JavaScript Implementation Example – Send All]
[JavaScript Implementation Example – Individual Push notification]
Last updated