function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RestTestRestTest 

403 Forbidden

Hi,

 

I'm new to SalesForce.

I have created a test account, read the documentation and created a developer test account:

- created the remote access app.

- reinitialized the security token and managed to login (oath + user + password + security token) and get the list of users from a client application in my internal network.

 

Unfortunately, the list of returned users is not the list of users that I have created in SF.

I then switched to my real SF account (trial within 30 days) and setup the correct credentials.

The login is succesfull, I get a correct token, and the history connection in my account shows that my application has successfully logged in.

 

Now, the problem is that every subsequent rest api call fails with a 403 forbidden error.

 

Could you please explain what I'm missing, since the code behaves correctly in the dev environment?

 

Thanks.

Pat PattersonPat Patterson

Does your user in the real SF account have the 'API Enabled' permission? You can check on the user's profile - it's under 'Administrative Permissions'. See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_concepts_security.htm for more details.

RestTestRestTest

I've found this link and following the procedure:

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_concepts_security.htm



[...] To access the API (to issue calls and receive the call results), a user must be granted the “API Enabled” permission. Client applications can query or update only those objects and fields to which they have access via the permissions of the logged-in user.

To create, edit, or delete a profile, go to Your Name | Setup | Manage Users | Profiles in the Salesforce user interface. To create, edit, or delete a permission set, go to Your Name | Setup | Manage Users | Permission Sets.

In this area, I have a message saying something (translated in english) "no permission set available for this licence".

Which licence "level" is necessary? (Can I create a user in the organization with the right access level?).

 

RestTestRestTest

I'm afraid I have the answer:

 

http://starrforce.com/2010/12/comparsion-of-salesforce-and-force-com-editions/

The Sales Cloud Professional  : [...] It does not have back-end (API) [...]

 

I will check if I can upgrade my trial to an enterprise edition.

 

But what is is possible to do for customers who have professionnal editions? The idea behind is to automate the creation of accounts for one of our customers who do not have SSO (and capabilities to create users on the fly).

Pat PattersonPat Patterson

Right now your options seem to be either upgrading to Enterprise or screen scraping the console. I would strongly discourage the latter course due to the fragility of screen scraping and the fact that you would have to retest and possibly fix it three times a year.