Key |
Value |
Description |
---|---|---|
name (string)
|
|
REQUIRED
|
username (string) Only characters or number, not space or special characters
|
|
REQUIRED
|
email (string)
|
|
REQUIRED
|
mobile_no (number) 10 Digit only
|
|
REQUIRED
|
curl -X POST \ https://obligr.io/api_v2/user/signup \ -H 'authorization: Bearer [YOUR_API_KEY]' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' -d 'name=Alexander&username=alexander&email=alexander%40example.com&mobile_no=9876543210'
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://obligr.io/api_v2/user/signup", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "name=Alexander&username=alexander&email=alexander%40example.com&mobile_no=98765XXXX", CURLOPT_HTTPHEADER => array( "authorization: Bearer [YOUR_API_KEY]", "cache-control: no-cache", "content-type: application/json" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
{ "success": true, "error": null, "data": "User `alexander` created success. Password sent on email or mobile." }