-
Author
-
February 17, 2017 at 10:26 #153288
volume4volume
ParticipantHello, How can I sync my users from my website to my app? I’m using Appypie and they offer a AJAX code and a PHP code?
COPY CODE$apdata["apiKey"] = "YOUR_API_KEY"; $apdata["name"] = "zak"; $apdata["email"] = "test@gmail.com"; $apdata["password"] = "1234567"; $apdata["phone"] = "9999556644"; $apdata["passwordType"] = ""; $ch = curl_init("http://snappy.appypie.com/api/v1/register.php?format=json"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $apdata); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); echo $result;Json Request URL
http://snappy.appypie.com/api/v1/register.php?format=json
Json Response
COPY CODE{"successCode":"200","message":"Registered successfully"}
XML Request URL
http://snappy.appypie.com/api/v1/register.php?format=xml
XML ResponseCOPY CODE<!--?xml version="1.0" encoding="UTF-8"?--> <response> <successcode>200</successcode> <message>Registered successfully</message> </response> orCOPY CODE$.ajax({ url: "http://snappy.appypie.com/api/v1/register.php?format=json", data : { apiKey:'YOUR_API_KEY', name:'Zak', email:'test@gmail.com', password:'12345678', phone:'1234567895', passwordType:'', }, type : "POST", success : function(r) { console.log(r); } });Json Request URL
http://snappy.appypie.com/api/v1/register.php?format=json
Json Response
COPY CODE{"successCode":"200","message":"Registered successfully"}
XML Request URL
http://snappy.appypie.com/api/v1/register.php?format=xml
XML ResponseCOPY CODE<!--?xml version="1.0" encoding="UTF-8"?--> <response> <successcode>200</successcode> <message>Registered successfully</message> </response>COPY CODE -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘General questions’ is closed to new topics and replies.