Title: help using API call
Last modified: September 1, 2016

---

# help using API call

 *  [aliferis](https://wordpress.org/support/users/aliferis/)
 * (@aliferis)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/help-using-api-call/)
 * Hi there
 * Would you be able to help me use the plugin to get Gravity forms to submit some
   field data to the API call I have been given ? – I am a bit lost
 * ————–
 *     ```
       /Send to Easy Call Now API
       function send_to_easy_call($info){
       	$Debug = false;
       	$API_URL = 'api.dxi.eu';
       	$API_USER = '';
       	$API_PASS = '';
   
       	$Token = get_auth_token($API_URL, $API_USER, $API_PASS, $Debug);
       	if (empty($Token)) die("Unable to obtain a token\n");
       	//if ($Debug) echo "Token: $Token\n";
   
       	if ($Debug) {echo '<br>';print_r($info);echo '<br>';}
   
       	$xml  = "<?xml version='1.0' encoding='utf-8' ?>\n";
   
       	$xml .= '<easycall>';
       	$xml .= '<ecnow_data>';
       	$xml .= '<dataset>'.$info['dataset'].'</dataset>';
       	$xml .= '<campaign>iTalk</campaign>';
       	$xml .= '<URN>'.$info['mobilePhone'].'</URN>';
       	$xml .= '<ddi_home>'.$info['mobilePhone'].'</ddi_home>';
       	$xml .= '<Title>'.$info['title'].'</Title>';
       	$xml .= '<FirstName>'.$info['firstName'].'</FirstName>';
       	$xml .= '<LastName>'.$info['lastName'].'</LastName>';
       	$xml .= '<Postcode>'.$info['postCode'].'</Postcode>';
       	$xml .= '<From>http://www.italktelecom.co.uk/</From>';
       	$xml .= '<IP>217.45.187.210</IP>';
       	$xml .= '<Email>support@italktelecom.co.uk</Email>';
       	$xml .= '</ecnow_data>';
       	$xml .= '</easycall>';
   
       	//var_dump($xml);
   
       	//Upload the data
       	upload_xml_data($xml, 'ecnow_data', 'create', $API_URL, $Token, $Debug);
       }
       ```
   
 * [https://wordpress.org/plugins/gravitate-gforms-api-helper/](https://wordpress.org/plugins/gravitate-gforms-api-helper/)

The topic ‘help using API call’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gravitate-gforms-api-helper_3a3a3c.
   svg)
 * [Gravitate Gforms API Helper](https://wordpress.org/plugins/gravitate-gforms-api-helper/)
 * [Support Threads](https://wordpress.org/support/plugin/gravitate-gforms-api-helper/)
 * [Active Topics](https://wordpress.org/support/plugin/gravitate-gforms-api-helper/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravitate-gforms-api-helper/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravitate-gforms-api-helper/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [aliferis](https://wordpress.org/support/users/aliferis/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/help-using-api-call/)
 * Status: not resolved