我一直在尝试使用netSuite api使用netsuite gem.
我可以登录该网站,但是当我尝试从API进行身份验证时,我收到了INVALID_LOGIN_CREDENTIALS错误.
这是请求的有效负载:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:messages_2011_1.platform.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:platformCore="urn:core_2011_1.platform.webservices.netsuite.com">
<env:Header>
<platformMsgs:passport>
<platformCore:email>email@email.com</platformCore:email>
<platformCore:password>--snip--</platformCore:password>
<platformCore:account>ACCOUNTNO</platformCore:account>
<platformCore:role type="role" internalId="ROLE"/>
</platformMsgs:passport>
</env:Header>
<env:Body>
<platformMsgs:get>
<platformMsgs:baseRef xsi:type="platformCore:RecordRef" internalId="4" type="customer"/>
</platformMsgs:get>
</env:Body>
</env:Envelope>
Run Code Online (Sandbox Code Playgroud)
这是响应的有效负载:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>You have entered an invalid email address or account number. Please try again.</faultstring>
<detail>
<platformFaults:invalidCredentialsFault xmlns:platformFaults="urn:faults_2011_1.platform.webservices.netsuite.com">
<platformFaults:code>INVALID_LOGIN_CREDENTIALS</platformFaults:code>
<platformFaults:message>You have entered an invalid email address or account number. Please try again.</platformFaults:message>
</platformFaults:invalidCredentialsFault>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">sb-partners-java002.svale.netledger.com</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)
Bru*_*olo 10
我刚刚解决了这个问题.如果您遇到问题请确保:
WebServices权限(参见Permissions > Setup)我遇到了两个问题.我的帐户,即使属于管理员角色,也缺少Web服务权限.我正在使用沙箱网址到非沙盒帐户.
https://webservices.na1.netsuite.com/wsdl/v2012_1_0/netsuite.wsdl (非沙箱)https://webservices.sandbox.netsuite.com/wsdl/v2012_1_0/netsuite.wsdl (沙箱)| 归档时间: |
|
| 查看次数: |
5141 次 |
| 最近记录: |