Reputation: 6421
Is it possible to send an anonymous request to a restlet? If so, how? I want to be able to submit lead data to a restlet via a form on my website. Right now, I'm getting a 400:
Permission Violation: You need the 'Lists -> Customers' permission to access this page.
Upvotes: 1
Views: 1416
Reputation: 146
You cannot call RESTlets without providing user credentials (it is required for you to always send NLAuth or OAuth, new token-based authentication feature). But you can create server-side Suitelet and mark it as AVAILABLE WITHOUT LOGIN. From this Suitelet you can call RESTlet of the same or different account by using SuiteScript nlapiRequestURL using NLAuth (system user credentials) or OAuth (using system user access token).
PS for OAuth calls you will need 3rd party lib - e.g. oauth-1.0a.js
Upvotes: 2
Reputation: 2850
I dont think that is possible. To connect to a RESTlet, you need to provide a username and password. Based on the error, it looks like the user you are using in the RESTlet is not allowed to the Customer list. You might need to give permission to the user account you are using to access the Customer list.
Upvotes: 5