gpt4 book ai didi

javascript - Twilio 可编程聊天 javascript SDK 不工作

转载 作者:行者123 更新时间:2023-11-29 23:56:36 25 4
gpt4 key购买 nike

我正在使用 twili 聊天演示 js master 进行测试。以访客身份登录后,我无法继续创建 channel 和消息。我在控制台中遇到的错误是这样的。

Navigated to http://localhost:81/twilio-chat-demo-js-master/public/644096210-idpiframe.js:24
GET https://accounts.google.com/o/oauth2/iframerpc?action=listSessions&redirect…A%2F%2Flocalhost%3A81&origin=http%3A%2F%2Flocalhost%3A81&app_package_name= 403 ()
Chat E: Failed to create session DOMException: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '<!DOCTYPE html>
<html lang="en-US"><head><title>
Twilio | Login
</title><meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="chrome=1" /><meta name="heartbeat" content="twilio" />
<meta name="csrfToken"content="a6ce62734d9365bda924a1900f243fb21b8cd1e3bb6e32ff795f0b05214e817b"/><meta name="msvalidate.01" content="3D12095F1193FB34A99AEC3A6839D3C1" /><meta name="p:domain_verify" content="461cef7d1c33614f6741f1219779b382"/><meta property="twitter:account_id" content="15936194" /><link href="https://plus.google.com/102140742001641246827" rel="publisher" /><link rel="shortcut icon" href="/console/bundles/favicons/img/Twilio_64.png" /><link rel="apple-touch-icon" href="/console/bundles/favicons/img/Twilio_57.png" /><link rel="apple-touch-icon" sizes="72x72" href="/console/bundles/favicons/img/Twilio_72.png" /><link rel="apple-touch-icon" sizes="114x114" href="/console/bundles/favicons/img/Twilio_114.png" /><link type="text/css" rel="stylesheet" href="//static1.twilio.com/bundles/console-core.css?5aee3970b1cf2a0ea543047650ae9f2a"/><link type="text/css" rel="stylesheet" href="//static1.twilio.com/bundles/console-partners.css?7c1ee82bf67108cf982c35489aae06cb"/><script type="text/javascript">

最佳答案

上面错误消息的问题是..get token 响应给出了完整的文本数据。实际上它应该只给出 token 作为响应。所以我用了rest api to get the token .然后它对我来说很好用。

关于javascript - Twilio 可编程聊天 javascript SDK 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41458634/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com