Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Postman时SalesForce Live Agent Rest API不工作_Rest_Salesforce_Postman_Salesforce Service Cloud - Fatal编程技术网

使用Postman时SalesForce Live Agent Rest API不工作

使用Postman时SalesForce Live Agent Rest API不工作,rest,salesforce,postman,salesforce-service-cloud,Rest,Salesforce,Postman,Salesforce Service Cloud,我目前正在测试开发中的Live Agent。如果我理解正确,我应该能够在传递正确信息的同时执行Postman命令来测试restapi 我能够执行系统/SessionId请求,并使用密钥、id和关联令牌返回响应。但是,当我尝试执行Chasitor/ChasitorInit时,我得到了状态200,OK”,但在代理中,处于联机状态的代理没有收到请求。 这就是我通过邮递员发送的内容-对于Chasitor/ChasitorInit: POST /chat/rest/Chasitor/ChasitorIni

我目前正在测试开发中的Live Agent。如果我理解正确,我应该能够在传递正确信息的同时执行Postman命令来测试restapi

我能够执行
系统/SessionId
请求,并使用密钥、id和关联令牌返回响应。但是,当我尝试执行
Chasitor/ChasitorInit
时,我得到了
状态200,OK”
,但在代理中,处于联机状态的代理没有收到请求。 这就是我通过邮递员发送的内容-对于
Chasitor/ChasitorInit

POST /chat/rest/Chasitor/ChasitorInit HTTP/1.1
Host: d.la1-c2-par.salesforceliveagent.com
X-LIVEAGENT-API-VERSION: 39
X-LIVEAGENT-AFFINITY: c01b1fa0
X-LIVEAGENT-SESSION-KEY: e29ca4be-0580-4769-85fd-0a2ae29efef1!1491574157856!+mmC0MgxsyXGOC5v3M4uKpCQHTg=
X-LIVEAGENT-SEQUENCE: 1
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 3e421cb9-e777-4a6c-9ead-8e14f1f8ff60
有效载荷:

{
"organizationId": "00D0Y0000xxxxx", 
"deploymentId": "5720Y0000xxxxx", 
"buttonId": "liveagent_button_online_5730Y0000xxxxxx", 
"sessionId": "e29ca4be-0580-4769-85fd-0a2ae29efef1", 
"userAgent": "", 
"language": "en-US", 
"screenResolution": "1900x1080", 
"visitorName": "Frank Underwood", 
"prechatDetails": [],  
"prechatEntities": [], 
"receiveQueueUpdates": true, 
"isPost": true 
}
我做错了什么?为什么代理没有聊天请求

当我使用.html页面开始与Live agent聊天时,它可以正常工作。代理接收邀请,可以接受,并且聊天有效。我试图查看使用.html javascript时发送的请求,但它似乎使用了套接字,这超出了我的调试能力


此外,如果我从现有的网络聊天中劫持会话密钥/关联令牌,并将代理转发给邮递员,我就能够劫持会话并继续发送/接收邮递员的消息。但是我不能从邮递员那里开始聊天。

我知道了。对于此呼叫:
/chat/rest/Chasitor/ChasitorInit

我需要提供buttonId-它应该是
“buttonId”:“5730Y000000L2ak”。

显然,当使用HTMLJS时,它从“liveagent按钮在线”中获取这个值