title: How do I call CITRIX (LogMeIn) API via PHP to register new GotoWebinar attendee?
body: <p>I am using the below code to register user to the webinar:</p>
  
  <pre><code>   $headers = array(
   'HTTP/1.1',
    'Accept: application/json',
    'Accept: application/vnd.citrix.g2wapi-v1.1+json',
    'Content-Type: application/json',
    'Authorization: OAuth oauth_token='.$access_token,
    'Name_First:test',
    'Name_Last:ank',
    'Email:ankinfo@yahoo.com',
     );
  
   $gtw_url = "https://api.citrixonline.com/G2W/rest/organizers/{organizerkey}/webinars/{webinarkey}/registrants";
   $curl = @curl_init();
   @curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); 
       @curl_setopt($curl, CURLOPT_URL, $gtw_url);
        @curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
       @curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
       @curl_exec($curl);
       @curl_close($curl);
  </code></pre>
  
  <p>I have passed webinar key and organizer key. I am supposed to get the output like:</p>
  
  <pre><code>￼HTTP/1.1 201 OK Content-Type: application/json
  {
      "registrantKey":5678,
      "joinUrl":"https://www1.gotomeeting.com/join/123456789/5678"
  }
  </code></pre>
  
  <p>The problem is that when i run the file i got output    </p>
  
  <pre><code>[
      {
          "registrantKey":106660361,
          "firstName":"test",
          "lastName":"1",
          "email":"rohankapoor99@yahoo.com",
          "status":"WAITING",
          "registrationDate":"2012-06-29T21:07:10Z",
          "joinUrl":"https://www1.gotomeeting.com/join/141654337/106660361",
          "timeZone":"America/Denver"
      }
  ]
  </code></pre>
  
  <p>I am using the create webinar URL, so why am I getting the info of the user that is already registered?</p>