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
ClariusClarius 

API Enabled setting

Hi,

 

How do I add the API Enabled permisison to my users? I am an administrator of the system, and the Add Permission Sets shows that I do not have any permissions to add. I did sign up for the Developers Edition of Salesforce

 

Thanks.

 

cloudElephantcloudElephant

Hi Clarius,

 

You must check with the profile that is assigned to your users.

 

Go to Setup Menu (Administration Setup) -> Manage Users -> Profiles -> <Select your user profile> -> Administrative Persmissions Section -> Check API Enabled.

 

Please let me know if this helps

 

 

ClariusClarius
Thanks. I found it for System Administrator role and all the other roles. It is already enabled for all roles, but I still get a INVALID_SESSION_ID when I try to connect to the REST API, after successful OAuth2 negotiation.
cloudElephantcloudElephant

Something is wrong with Session Id that is passed after successful OAuth2 authentication. Try to capture session Id using
{!$Api.Session_ID}

 

Hope this helps.

ClariusClarius
I do not understand your response. For example, I did an OAuth2 authentication, got a successful authentication using the redirect_url. In the redirect_url callback, I got the JSON response with the Access Token and the Instance URL. I then try the following, externally on the console. $ curl https://na9.salesforce.com/services/data/v20.0/ -H 'Authorization: Bearer 00DE0000000axkl!ARsAQBSw.MrOzpseWu7W0WfC_Ulg6sDkDc58lf7PY0G6rsnotqouGEGhb5gAfyVznD.k9PWOG5LVYtLAFQp0Rq7hAxQvnDwy' and it gives me the following error. [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}] Note that the token has not expired (only a minute went by since the callback) and my Instance URL and Access Token are passed to 'curl' correctly. Thanks