API request to join/add user to an existing Group

<?php $url = ‘https://yourdomain/connect/’; $ch = curl_init($url); $datas = array( ‘key’ => ‘Grupo Connect Secret Key’, ‘do’ => ‘joingroup’, ‘groupid’ => ‘groupid’,//Specify the groupid (You will find group id in gr_options table id column) ‘userid’ => ‘[email protected]’, ‘role’ => 0, ); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $res = curl_exec($ch); curl_close($ch); $res = json_decode($res); if […]

API request to create a new group

<?php $url = ‘https://yourdomain/connect/’; $ch = curl_init($url); $datas = array( ‘key’ => ‘Grupo Connect Secret Key’, ‘do’ => ‘creategroup’, ‘name’ => ‘Group Name’, ‘password’ => 0, //Specify password for password protected group ‘visibility’ => true, //Specify false for Secret Group ‘sendpermission’ => 0, // Specify adminonly for granting send messages permission only to Group Admins […]

API request to delete a user

<?php $url = ‘https://yourdomain/connect/’; $ch = curl_init($url); $data = array( ‘key’ => ‘Grupo Connect Secret Key’, ‘do’ => ‘deleteuser’, ‘user’ => ‘[email protected]’,//username or email address ); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $res = curl_exec($ch); curl_close($ch); $res = json_decode($res); if ($res->result) { } else { return $res->error; } ?>

API request to login or generate login link

<?php $url = ‘https://yourdomain/connect/’; $ch = curl_init($url); $data = array( ‘key’ => ‘Grupo Connect Secret Key’, ‘do’ => ‘login’, ‘user’ => ‘[email protected]’,//username or email address ‘redirect’ => ”,//You can specify URL to load after login (optional) ); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $res = curl_exec($ch); curl_close($ch); $res = json_decode($res); if ($res->result) { return $res->loginlink; […]

API request to force logout a user

<?php $url = ‘https://yourdomain/connect/’; $ch = curl_init($url); $data = array( ‘key’ => ‘Grupo Connect Secret Key’, ‘do’ => ‘logout’, ‘user’ => ‘[email protected]’,//username or email address ); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $res = curl_exec($ch); curl_close($ch); $res = json_decode($res); if ($res->result) { } else { return $res->error; } ?>

API request to get User info

<?php $url = ‘https://yourdomain/connect/’; $ch = curl_init($url); $data = array( ‘key’ => ‘Grupo Connect Secret Key’, ‘do’ => ‘getinfo’, ‘user’ => ‘[email protected]’,//username or email address ); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $res = curl_exec($ch); curl_close($ch); $res = json_decode($res); if ($res->result) { return $res; //returns user information } else { return $res->error; } ?>

API request to edit existing user

<?php $url = ‘https://yourdomain/connect/’; $ch = curl_init($url); $data = array( ‘key’ => ‘Grupo Connect Secret Key’, ‘do’ => ‘edituser’, ‘changename’ => ‘Change Name’, ‘changeusername’ => ‘Change Username’, ‘changeemail’ => ‘[email protected]’, ‘changepass’ => ‘changepassword’, ‘changeavatar’ => ‘https://imageurlgoeshere’, ‘changerole’ => ‘3’, ‘cf_identifier’ => ‘customfieldvalue’,//Check edit custom field area for custom field Identifier ‘user’ => ‘[email protected]’,//username or email […]

API request to create new user

<?php $url = ‘https://yourdomain/connect/’; $ch = curl_init($url); $data = array( ‘key’ => ‘Grupo Connect Secret Key’,//You will find this in Grupo Settings ‘do’ => ‘createuser’, ‘name’ => ‘Full Name’, ‘user’ => ‘username’, ’email’ => ‘[email protected]’, ‘pass’ => ‘password’, ‘avatar’ => ‘https://imageurlgoeshere’, ‘cf_identifier’ => ‘customfieldvalue’,//Check edit custom field area for custom field Identifier ‘role’ => ‘3’, […]