Skip to content

Instantly share code, notes, and snippets.

@mimeoconnect
Created April 3, 2011 20:06
Show Gist options
  • Select an option

  • Save mimeoconnect/900720 to your computer and use it in GitHub Desktop.

Select an option

Save mimeoconnect/900720 to your computer and use it in GitHub Desktop.
This is a sample PHP code for adding a new user.
<?php
require_once "rest_client.php";
//Sandbox
//$root_url = "connect.sandbox.mimeo.com/2010/09/";
$user_name = "[user name]";
$password = "[user password]";
//Live
$root_url = "connect.mimeo.com/2010/09/";
$user_name = "[user name]";
$password = "[user password]";
$rest = new RESTclient($root_url,$user_name,$password);
$inputs = array();
$inputs["Email"] = "info@dot.com";
$inputs["Password"] = "password";
$inputs["FirstName"] = "First Name";
$inputs["LastName"] = "Last Name";
$inputs["DaytimePhoneNumber"] = "555-555-5555";
$url = "AccountService/user?new=true";
$rest->createRequest($url,"POST",$inputs);
$rest->sendRequest();
$output = $rest->getResponseBody();
//echo $output;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment