Giter Site home page Giter Site logo

Comments (7)

mkovel avatar mkovel commented on August 19, 2024

has any update?

from botframework-directlinejs.

ukphillips avatar ukphillips commented on August 19, 2024

@mkovel I just worked through this issue with the webchat library! How are you initializing the conversation? To solve this I needed to obtain the conversation token by posting the trusted origins:

POST https://directline.botframework.com/v3/directline/tokens/generate

with your master secret as a bearer token and a body of:

{
TrustedOrigins: ["https://URLHOSTINGCLIENTSIDECODE"]
}

Here was my original issue for reference: microsoft/botframework-sdk#4745

from botframework-directlinejs.

mkovel avatar mkovel commented on August 19, 2024

Hi, @ukphillips

  1. I've received token throug:
POST https://directline.botframework.com/v3/directline/tokens/generate 
Authorization: Bearer ___MY_DIRECTLINE_SECRET___
  1. And then are creating new DL with received token
new DirectLine({ token: __RECIEVED_TOKEN__,  webSocket: true});

Did I answer your question?

from botframework-directlinejs.

mkovel avatar mkovel commented on August 19, 2024

@ukphillips O... I think finaly I understood what you mean. )))
OK i will try your solution tomorrow and give you feedback.
thanks

from botframework-directlinejs.

ukphillips avatar ukphillips commented on August 19, 2024

@mkovel sounds like you know what I meant, but just make sure you include the JSON body with the TrustedOrigins property when generating the token. Let me know how it goes!

from botframework-directlinejs.

compulim avatar compulim commented on August 19, 2024

Looks like @ukphillips resolved the issue.

One side note, the TrustedOrigins is being moved inside Direct Line channel settings page. You can find more information in this blog post.

from botframework-directlinejs.

alexknipfer avatar alexknipfer commented on August 19, 2024

@compulim Is there a way to specify a wildcard as the trusted origin to allow all domains? Configuring it in directline doesn't allow for a * as a domain. We allow for our client to embed on pages of their choice, so it would be difficult to maintain the list of trusted origins.

from botframework-directlinejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.