Hello,
We're having trouble with the code that we're sending for Token Based Authentication. Was curios if others had troubles intially
I believe we have all the settings right on the NetSuite side and to me this request looks written correctly per the spec NS provided in HELP. We're still getting a login error though on the callback.
Specific details removed for obvious reasons but can anyone see anything structurally in correct with this?
What is sent:
<?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:Header>
<ns1:tokenPassport xmlns:ns1="urn:core_2016_1.platform.webservices.ne tsuite.com" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
<ns1:account>REMOVED FOR OBVIOUS REASONS</ns1:account>
<ns1:consumerKey>REMOVED FOR OBVIOUS REASONS</ns1:consumerKey>
<ns1:token>REMOVED FOR OBVIOUS REASONS</ns1:token>
<ns1:nonce>REMOVED FOR OBVIOUS REASONS</ns1:nonce>
<ns1:timestamp>1473191911957</ns1:timestamp>
<ns1:signature algorithm="HMAC_SHA256">REMOVED FOR OBVIOUS REASONS</ns1:signature>
</ns1:tokenPassport>
<ns2:searchPreferences xmlns:ns2="urn:messages_2016_1.platform.webservice s.netsuite.com" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
<ns2:bodyFieldsOnly>false</ns2:bodyFieldsOnly>
<ns2:pageSize>2</ns2:pageSize>
</ns2:searchPreferences>
</soapenv:Header>
<soapenv:Body>
<search xmlns="urn:messages_2016_1.platform.webservices.ne tsuite.com">
<searchRecord xmlns:ns3="urn:accounting_2016_1.lists.webservices .netsuite.com" xsi:type="ns3:ItemSearch">
<ns3:basic xmlns:ns4="urn:common_2016_1.platform.webservices. netsuite.com" xsi:type="ns4:ItemSearchBasic">
<ns4:type>
<ns5:searchValue xmlns:ns5="urn:core_2016_1.platform.webservices.ne tsuite.com" xsi:type="xsd:string">inventoryItem</ns5:searchValue>
</ns4:type>
</ns3:basic>
</searchRecord>
</search>
</soapenv:Body>
</soapenv:Envelope>
What is received:
<?xml version="1.0"?>
<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>Invalid login attempt.</faultstring>
<detail>
<platformFaults:invalidCredentialsFault xmlns:platformFaults="urn:faults_2016_1.platform.webservi ces.netsuite.com">
<platformFaults:code>USER_ERROR</platformFaults:code>
<platformFaults:message>Invalid login attempt.</platformFaults:message>
</platformFaults:invalidCredentialsFault>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">sb-partners-java052.svale.netledger.com</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
For a sanity check here are the settings we have all appear to be correct:
1. User is assigned a Web Services Only specific role
2. Integration Record is setup (with both TBA and User/PW setup, figured we'd just uncheck User/PW once TBA is functioning)
3. Even setup a User Access Token with the above settings too.
4. Web Services Role has following permissions: Web Services, Log in Using Access Tokens, Web Services Only Role