inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 4, 2018 14:23:44 GMT -8
I have been asked to implement a feature using the cbox.ws webhook, which sends a POST request to a specified URL (in this case, a Forums.net forum). (This example is in PHP, but as PHP is not an option here, it would be done in JavaScript.) In the spirit of AJAX being against ProBoards' development guidelines, would using this webhook fall into a similar camp? It also requires sending a 200 OK response back to Cbox. I'm not even sure that I could implement this feature with the data provided, but thought I should check if it would be allowed in the first place before proceeding.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jul 5, 2018 7:48:14 GMT -8
Hi, elli. If the request is being made to the forum itself it would be against the developer guidelines, but requests going to sites other than those on our service don't affect us so those don't violate any of the rules laid out there.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 5, 2018 8:37:36 GMT -8
Thanks Brian. Pretty sure the initial POST request is sent to the forum, you have to add the callback URL in Cbox's settings. And it's JSON data, so would need get/parse to use it. Unless anyone has an idea for using this without sending a request to the forum, going to go with "No".
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jul 5, 2018 8:48:18 GMT -8
Is the purpose of this code to post something on the forum when a message is sent to the Cbox? I'm having trouble understanding what it's supposed to do based on the information on the page alone.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 5, 2018 9:06:35 GMT -8
Yeah, the documentation is not very clearly written. Basically it provides you with a copy of new messages as they're posted to the Cbox. The feature I've been asked to implement is a "NEW" notification that shows up on the button that triggers the Cbox on the forum.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jul 5, 2018 9:36:24 GMT -8
I think what it really needs is an event listener so that you can run a Javascript event on the page upon changes to the messages within the Cbox.
Since the entire thing is reliant on a callback URL to send a specific type of request to I can't really think of anything compliant with the developer guidelines that would work short of coding and hosting a solution hosted on a different domain that can interpret and handle the request as necessary.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 5, 2018 11:49:02 GMT -8
Don't think I'd be able to use an event listener either, because the Cbox is an iframe and not on the same domain. Right?
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jul 5, 2018 11:52:15 GMT -8
Pretty much. I was just mentioning it for the sake of mentioning it in the hopes that the webhook wasn't the sole option they offered.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 5, 2018 11:56:34 GMT -8
Brian A good thought, though! Thanks for mentioning it. I've contacted them to see if they have any other option.
|
|