Page 1 of 1

Disable Single Agent API Confirmation Screen

PostPosted: Mon Feb 08, 2021 6:22 am
by inspire888
Hi guys,

We're using a HTML form to load leads via the single agent API and that in itself works fine.

The only issue is, after each successful load, you need to go back to the form and load it all over again.

Is there a way to disable to confirmation screen and simply redirect back to the webform after each lead has been sent to the dialer?

If not, what is the best way to implement a form to send leads to the dialer one at a time?

Thanks

Re: Disable Single Agent API Confirmation Screen

PostPosted: Mon Feb 08, 2021 7:21 pm
by carpenox
check out this simple method: https://cyburityllc.com/?p=1366

Re: Disable Single Agent API Confirmation Screen

PostPosted: Tue Feb 09, 2021 2:11 am
by inspire888
carpenox wrote:check out this simple method: https://cyburityllc.com/?p=1366


Checked out your link and that is perfect.

Tried to use similar code to what you had (couldn't copy/paste but zoomed in) but I'm getting all sorts of PHP errors.

Any chance you have the code to past here?

Re: Disable Single Agent API Confirmation Screen

PostPosted: Tue Feb 09, 2021 3:44 am
by carpenox
Code: Select all
<?php
if (isset($_POST['phone']) && $_POST['phone'] != '') {
   $url = 'https://cyburityllc.com/vicidial/non_agent_api.php';
   $query_fields = [
      'source' => 'sunfunnow.com',
      'user' => 'apiuserid',
      'pass' => 'apipass',
      'function' => 'add_lead',
      'list_id' => '2002',
      'add_to_hopper' => 'Y',
      'hopper_priority' => '99',
      'phone_code' => '1',
      'phone_number' => $_POST['phone'],
      'first_name' => $_POST['fname'],
      'last_name' => $_POST['lname'],
      'email' => $_POST['email'],
         
   ];
   
   $curl = curl_init($url . '?' . http_build_query($query_fields));
   $response = json_decode(curl_exec($curl), true);
   curl_close($curl);
header("Location: https://www.sunfunnow.com/application-received/");
}
?>



this code is just the PHP code snippet, this is the part you meant correct?

Re: Disable Single Agent API Confirmation Screen

PostPosted: Tue Feb 09, 2021 3:56 am
by inspire888
Yes thanks for that.

I just solved it before you posted.

I had put ( ) instead of { } and the PHP failed.

All works perfectly now.

Thank you very much!!!!!

Re: Disable Single Agent API Confirmation Screen

PostPosted: Tue Feb 09, 2021 3:57 am
by carpenox
no problem. anytime you want to see the use of a function just reply to my API post on the forum or thru my business site and I will make a real life example