-->

NetSuite SuiteTalk REST Web Services - Invalid Log

2020-04-14 03:58发布

问题:

I am trying to use the NetSuite SuiteTalk REST Web Services to access NetSuite CRM data.

I have the access up and working in production. Able to retrieve record data and metadata.

I am now trying to set up access in the sandbox for more in-depth testing.

In the sandbox I have: - Enabled rest web services - Enabled token based authentication - Given user concurrent web services permission - Given user Log in using access tokens permission - Created an integration - Created an access token

All of these actions mirrored what was done in production.

When I attempt any kind of GET to the web service, I receive a 401 - Invalid login attempt.

When I check the Login Audit Trail, I don't see any record of the GET attempt, failed or otherwise.

Is there something of a systemic nature that I have to do additionally in the sandbox to enable rest web services? Above and beyond enabling it in SuiteCloud/SuiteTalk?

The fact that I see absolutely nothing in the audit trail makes me believe that something is still "turned off".

===> 4/4/2020 Update

ed14 and Nihkil,

Thank you for your responses, and sorry for the delay in responding back.

The hyphen to underscore in the realm did not help me unfortunately.

Let me recap recent attempts:

1) Started by verifying that REST API testing in production still works.

2) The sandbox was refreshed by a CRM admin. The application was still there, but my access token was not. I created a new one in the sandbox.

Is it possible to delete the application? I cannot see any way to do that.

3) Tested with existing Consumer Token and new Access Token. Got the same response as from my first post: "title": "Invalid login attempt, for more details see Login Audit Trail.",

4) Tested by slightly modifying the URL to make sure I was not going to a black hole somewhere. It gave me the expected error.

5) Tested by modifying the realm: Realm 9999999-sb4 to Realm 9999999_sb4 It gave me an error which leads me to believe that my original realm is correct: "title": "An unexpected error occurred. Error ID: k8hd8pqej3unxblmaoik",

Again, none of the tests show up in anywhere in the audit log as a failed attempt.

Not sure where to go from here? Delete the sandbox application (if possible) and start again? Or new application in sandbox?

Thanks for any and all help.

Bryan Hunt

回答1:

I had the same issue using the sandbox. Apparently there is a mismatch between the account ID and the account ID in the URL.

The account ID: XXXXX_SB1 The account ID in the url: XXXXX-SB1

This solved the problem for me.



回答2:

In Postman in your request tab and then in the authorization tab in the advanced section there is a field called Realm. Put the account id in the realm field with underscores.