Identities - Change User_token

edited February 2015 in Questions
Attempting to change the User_Token on an Identity_Token without success. Anyone have a working example for this?

The online documentation shows the following but I have no idea what to code for the Post information. http://docs.oneall.com/api/resources/identities/relink-identity/

POST data to include in your request:
{ "request":{ "user":{ "user_token": "#user_token#" } } }

My PHP Code.
$post_array['user_token']=$row['oneall_user_token']; if ($oneall_curly->put (SITE_DOMAIN . "/identities/".$identity_token."/link.json",$post_array)) { $result = $oneall_curly->get_result (); print_r (json_decode ($result->body)); } //Error else { $result = $oneall_curly->get_result (); echo "Error: " . $result->http_info . "\n"; }

Result:
stdClass Object ( [response] => stdClass Object ( [request] => stdClass Object ( [date] => Tue, 24 Feb 2015 00:31:22 +0100 [resource] => /identities/7f5b5f85-1c41-4b6d-b46d-36d68b3d4542/link.json [status] => stdClass Object ( [flag] => error [code] => 400 [info] => Syntax Error: please check the format of your request ) ) ) )


Best Answer

Answers

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.