I am trying to write a php script to send a message but did not manage to succeed even with the example given.
\<?php $ch = curl\_init(); curl\_setopt($ch, CURLOPT\_URL, "https://gamethrive.apiary-mock.com/api/v1/notifications"); curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, TRUE); curl\_setopt($ch, CURLOPT\_HEADER, FALSE); curl\_setopt($ch, CURLOPT\_POST, TRUE); curl\_setopt($ch, CURLOPT\_POSTFIELDS, "{\"app\_id\": \"5eb5a37e-b458-11e3-ac11-000c2940e62c\",\n\"contents\": {\"en\": \"English Message\"},\n\"isAndroid\": true,\n\"isIos\": true,\n\"included\_segments\": [\"All\"],\n\"send\_after\": \"Fri May 02 2014 00:00:00 GMT-0700 (PDT)\"}"); curl\_setopt($ch, CURLOPT\_HTTPHEADER, array("Content-Type: application/json")); $response = curl\_exec($ch); curl\_close($ch); var\_dump($response); ?\>
Also what is the correct URL to use?
I am seeing a few there.
https://gamethrive.apiary-mock.com/api/v1/notifications
https://gamethrive.com/api/v1/notifications
https://gamethrive.apiary.io/api/v1/notifications
Thanks in advance.