如何解决来自OIC的Twilio whatsapp REST API调用给出了此错误400,Postman调用工作正常
Error
Error message is - com.oracle.bpel.client.BPELFault: faultName: {{http://xmlns.oracle.com/cloud/adapter/REST/PostMessage_REQUEST}APIInvocationError}
parts: {{
null=<soap-env:Fault xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode xmlns:faultsrc="http://xmlns.oracle.com/cloud/adapter/REST/PostMessage_REQUEST">faultsrc:APIInvocationError</faultcode><faultstring>ICS runtime execution error</faultstring><detail><ICSfaultVar>
<ns2:APIInvocationError xmlns:ns2="http://xmlns.oracle.com/cloud/generic/rest/fault/REST/PostMessage"><ns2:type/><ns2:title/><ns2:detail/><ns2:errorCode/><ns2:errorDetails><ns2:type>http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1</ns2:type><ns2:title>Bad Request</ns2:title><ns2:errorCode>400</ns2:errorCode><ns2:errorPath><![CDATA[POST https://api.twilio.com/2010-04-01/Accounts/xxxxxxxxxxxxxx/Messages.json%7BFrom%7D%7BTo%7D%7BBody%7D?To=whatsapp:+971501264905&From=whatsapp:+14155238886&Body=Approved-Absence-Dated_30-Nov-2020_To_01-Dec-2020 returned a response status of 400 Bad Request]]></ns2:errorPath><ns2:instance><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
<TwilioResponse><RestException><Code>21604</Code><Message>A 'To' phone number is required.</Message><MoreInfo>https://www.twilio.com/docs/errors/21604</MoreInfo><Status>400</Status></RestException></TwilioResponse>.A 400 Bad Request Error indicates that the target service is unable (or refuses) to process the request sent by the client (Oracle Integration Cloud),due to an issue that is perceived by the server to be a client problem. You can trace the cURL representation of the request sent to the target service from the Oracle Integration Cloud server logs. Try invoking the target service using cURL. It may also be that one of the intermediaries (proxy,LBR) could be returning this code. ]]></ns2:instance></ns2:errorDetails></ns2:APIInvocationError></ICSfaultVar><reason>Fault Details :
<ns2:APIInvocationError xmlns:ns2="http://xmlns.oracle.com/cloud/generic/rest/fault/REST/PostMessage"><ns2:type/><ns2:title/><ns2:detail/><ns2:errorCode/><ns2:errorDetails><ns2:type>http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1</ns2:type><ns2:title>Bad Request</ns2:title><ns2:errorCode>400</ns2:errorCode><ns2:errorPath><![CDATA[POST https://api.twilio.com/2010-04-01/Accounts/xxxxxxxxxxxxxxxxxxxxx/Messages.json%7BFrom%7D%7BTo%7D%7BBody%7D?To=whatsapp:+971501264905&From=whatsapp:+14155238886&Body=Approved-Absence-Dated_30-Nov-2020_To_01-Dec-2020 returned a response status of 400 Bad Request]]></ns2:errorPath><ns2:instance><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
<TwilioResponse><RestException><Code>21604</Code><Message>A 'To' phone number is required.</Message><MoreInfo>https://www.twilio.com/docs/errors/21604</MoreInfo><Status>400</Status></RestException></TwilioResponse>.A 400 Bad Request Error indicates that the target service is unable (or refuses) to process the request sent by the client (Oracle Integration Cloud),LBR) could be ret:Application Error</reason><operation>execute</operation></detail></soap-env:Fault>}
cause: {null}
Parallel For-Each Failed
应该执行哪些更改以使REST API调用起作用,大约所有信息与之相关AccountId:Authtoken在调试调用中未显示
您能指出这个问题吗?
AR
解决方法
读取错误消息A 'To' phone number is required.
。
请使用x-www-form-urlencoded
格式(而不是JSON)来请求他。
Make a Write Request to an External API using urlencoded data
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。