PHP

Hi, can I use your REST API with PHP? In case, how must the PHP look like for creating a user? Regards and thanks in advance.

You can curl lib inside the php to make the rest calls. Sample bash curl request for the same is given in home page. You need to convert it into php equipment curl request.

Also you can use any third party lib for php

try this

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://gorest.co.in/public/v2/users',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"name":"Tenali Ramakrishna", "gender":"male", "email":"[email protected]", "status":"active"}',
  CURLOPT_HTTPHEADER => array('Content-Type: application/json')
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

Little markdown supported