Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The notification API for new jobs and new knowledge posts will come with four varaibles:
- title: This will be the title of the notification
- body: This will be the body of the notification
- post_type: This will indicate what type of notification. 'post' for knowledge post and 'vacant-job' for job
- post_id: This will be the id of the 'post' or 'vacant-job' that can be used to link too the correct page
- You can use the following cURL to test a notification for a 'post':
- curl -X POST \
- https://fcm.googleapis.com/fcm/send \
- -H 'authorization: key=AAAA8clxIE8:APA91bEi__cjOjkI8R1mguhtEfLKBHOYzQ9t7u_BgcuA1vnmtLTEs_dMZAvpRcl03K7H81RjG3XQwv18Sdv2zP9MH8SC5FZCdF_PPVI0Xqd67AY2uS3VOZvQur4KA5VxmaPuBQn3ZnUy' \
- -H 'cache-control: no-cache' \
- -H 'content-type: application/json' \
- -d '{"registration_ids":["PUT_DEVICE_ID_HERE"],"notification":{"title":"Test title","body":"Test body","post_type":"post","post_id":22021},"data":{"title":"Test title","body":"Test body","post_type":"post","post_id":22021}}'
- You can use the following cURL to test a notification for a 'vacant-job':
- curl -X POST \
- https://fcm.googleapis.com/fcm/send \
- -H 'authorization: key=AAAA8clxIE8:APA91bEi__cjOjkI8R1mguhtEfLKBHOYzQ9t7u_BgcuA1vnmtLTEs_dMZAvpRcl03K7H81RjG3XQwv18Sdv2zP9MH8SC5FZCdF_PPVI0Xqd67AY2uS3VOZvQur4KA5VxmaPuBQn3ZnUy' \
- -H 'cache-control: no-cache' \
- -H 'content-type: application/json' \
- -d '{"registration_ids":["PUT_DEVICE_ID_HERE"],"notification":{"title":"Test title","body":"Test body","post_type":"vacant-job","post_id":1780},"data":{"title":"Test title","body":"Test body","post_type":"vacant-job","post_id":1780}}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement