Digital Assistant and Mobile

Get Involved. Join the Conversation.

Topic

    Abhishek Singh
    Image is not getting displayed in my chatbot while using...
    Topic posted September 4, 2018 by Abhishek SinghRed Ribbon: 250+ Points, tagged Bots, Conversational AI, Messaging, Mobile, OMCE, Virtual Assistant 
    236 Views, 4 Comments
    Title:
    Image is not getting displayed in my chatbot while using carbObject of MessageModel
    Summary:
    I am trying to show the product images in chatbot from CX cloud instance via messageModel.
    Content:

    I am passing all the paramters to the cardObject of messageModel inlcuding imageUrl. Other things are coming fine like Title, description, action(null).. but image is not displaying in responses from chatbot.

    I observed that when i am trying to browse the image in browser via the image url (copying from json response) it is throwing error as below

    {

    • "errorCode": "00001000",
    • "message": "The user is not authenticated.",
    • "status": "401"

    }

    In cardObject, i am providing the details  of product from CX Cloud  instance. Is it that to fetch the image, i have to provide further authentication, if so, how can we pass into cardObject or any way to get the image dispalyed in chatbot?

     

    Version:
    latest
    Image:
    Code Snippet:

    Comment

     

    • Frank Nimphius

      The images apparently are saved in a non-public storage. It requires authentication before it can be accessed. This is why the CR component cannot display them. An option to solve the issue is to create a Node.js app proxy that you execute on e.g. Application Container Cloud Service and that authenticates accordingly to then server the images. The card would then use the URL to the ACCS to server the images

      Frank

    • Abhishek Singh

      Images are appearing now, just tweaked url a little bit around.

      But,

      It is coming in chatbot only when i am logged to commerce cloud instance in another tab of browser and testing bot in other tab of the same browser.

      Not sure why?  On what logic it is happening so and even it is valid thing then how to bring images without even login to commerce cloud instance in tab of the same browser where i am testing my bot.

      Three Images:

      a. Before login to commerce cloud instance

      b. once logged in to cc instance

      c. testing after login

       

    • Abhishek Singh

      B. once logged in to cc instance

    • Abhishek Singh

      c. doing testing in another tab of same browser after login. I have tried the same thing in different browser too, observed the same.