Skip to Content Skip to Menu

[SOLVED] CBsubs url post integration

  • activha
  • activha
  • OFFLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
11 years 1 month ago - 11 years 1 month ago #234056 by activha
[SOLVED] CBsubs url post integration was created by activha
Hello

We have a problem making url integration work with liveagent form qualityunit with the following.

We want to call an API working like this : (see example on API docs
Code:
Example of calling POST request //next example will insert new conversation $service_url = 'http://example.com/api/conversations'; $curl = curl_init($service_url); $curl_post_data = array( 'message' => 'test message', 'useridentifier' => 'agent@example.com', 'department' => 'departmentId001', 'subject' => 'My first conversation', 'recipient' => 'recipient@example.com', 'apikey' => 'key001' ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); if ($curl_response === false) { $info = curl_getinfo($curl); curl_close($curl); die('error occured during curl exec. Additioanl info: ' . var_export($info)); } curl_close($curl); $decoded = json_decode($curl_response); if (isset($decoded->response->status) && $decoded->response->status == 'ERROR') { die('error occured: ' . $decoded->response->errormessage); } echo 'response ok!'; var_export($decoded->response);

and we have set up the integration as post like this :
Code:
https://ourwebsite.com/support/api/index.php?handler=conversations message=[PLAN_NAME] useridentifier=email@ourwebsite.com subject=oursubject department=Department001 recipient=[EMAIL] do_not_send_mail=Y apikey=xxxxxxx

However this does not work with CBsubs.

Is this integration compatible with the above suggested post code ?
Do we have to set fields between quotes or something else ?

Thanks for helping
Last edit: 11 years 1 month ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
11 years 1 month ago #234079 by krileon
Replied by krileon on topic CBsubs url post integration
According to their documentation your POST URL isn't correct. It should be in the below format.

Code:
http://example.com/api/conversations

The URL integration just makes HTTP calls so it should be working fine. Maybe test your usage with CB Auto Actions and its Request action on the after login trigger then enable its debugging parameter so it can output the results of the HTTP request to let you know what part failed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • OFFLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
11 years 1 month ago #234085 by activha
Replied by activha on topic CBsubs url post integration
Yes this is the correct URL but without mod rewrite, using index.php

I'll test with auto action to debug

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • OFFLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
11 years 1 month ago #234281 by activha
Replied by activha on topic CBsubs url post integration
After debugging it seems that url integration does not work with https protocol. All is ok with standard http protocol

I dont know if it comes from CBSubs ? or from LiveAgent ?

Your idea ?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
11 years 1 month ago #234287 by krileon
Replied by krileon on topic CBsubs url post integration
It currently uses our Snoopy library instead of using CURL directly. When using an HTTPS URL it needs to use "exec", which is probably disabled by your host. So you'll need to use HTTP or enable usage of exec for now.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • OFFLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
11 years 1 month ago #234289 by activha
Replied by activha on topic CBsubs url post integration
http will do it for now :-)

Thanks for helping

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum