Legacy Dev Forum Posts

 View Only

Sign Up

Web-Callback and Authorization

  • 1.  Web-Callback and Authorization

    Posted 06-05-2025 18:14

    alialjohani | 2018-09-26 12:55:04 UTC | #1

    Dears All,

    I would like to provide for our customer a JS code to be implemented in the customer's website. All visitor of the website can request a callback.

    What is the best authentication method for this? I do not think I need to authenticate the visitor. It should be like the web-chatting in which the details are just related to Organization (org id, org name, queue id, etc) without needing for authenticating.

    Is there an example code for web-callback without authentication? Is this possible?

    Best Regards, Ali


    tim.smith | 2018-09-26 12:57:55 UTC | #2

    There is no unauthenticated way to create a callback in PureCloud; the requesting application must be authorized. To allow a website visitor to create a callback, you must host your own middleware service that authorizes with PureCloud and your website must consume that service to create the callback. Here's an open source project that does that, and a few other things: https://github.com/MyPureCloud/public-stats-service.


    alialjohani | 2018-09-26 19:08:12 UTC | #3

    Dear Tim,

    Thank you for the feedback. Please, correct me if I am wrong.

    For website visitors, I created "Token Implicit Grant (Browser)". Then, I used the generated Client ID, and then I got the token as shown in this tutorial: https://developer.mypurecloud.com/api/tutorials/oauth-implicit/#javascript

    After I have the token, I use "postConversationsCallback" api.

    Is this approach correct? It seems it was working when I was Logged-in to the PureCloud, However, after I logged out, it prompts to me PureCloud Login UI. For the vistors, I do not want this Login screen to show up.

    Please, any advice for this.

    Thank you and best regards, Ali


    tim.smith | 2018-09-26 19:19:02 UTC | #4

    alialjohani, post:3, topic:3628
    It seems it was working when I was Logged-in to the PureCloud, However, after I logged out, it prompts to me PureCloud Login UI. For the vistors, I do not want this Login screen to show up.

    Right, that's why you need a back end service that's authorized using client credentials. The app I linked is an example of this.


    alialjohani | 2018-09-30 12:03:56 UTC | #5

    Dear Tim,

    Thank you for the support and help. Best Regards, Ali


    system | 2018-10-31 12:03:56 UTC | #6

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 3628