MediaDiGi Posted December 30, 2017 Posted December 30, 2017 Hello guys, I'm stuck when I try to edit a member group according to this instructions: https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTitem I see the request in inside IPS with Response Code 200 OK, but the member group is not changing, Here is the Log: POST core/members/45783 REQUEST DATA [] RESPONSE { "id": 45783, Here is my PHP code $data = array("group" => 12); $data_string = json_encode($data); $ch = curl_init($this->communityUrl.'/core/members/'.$memberId); curl_setopt_array($ch, array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_HTTPHEADER => array('Content-Type: application/json','Content-Length: ' . strlen($data_string)), CURLOPT_USERPWD => "{$this->apiKey}:", CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data_string )); $result = curl_exec($ch); return $result; Please let me know what I'm doing wrong.
newbie LAC Posted December 31, 2017 Posted December 31, 2017 Hello, $data = array("group" => 12); $ch = curl_init($this->communityUrl.'/core/members/'.$memberId); curl_setopt_array($ch, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_USERPWD => "{$this->apiKey}:", CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data )); $result = curl_exec($ch); return $result;
Recommended Posts
Archived
This topic is now archived and is closed to further replies.