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
sanjayssnsanjayssn 

403 forbidden error for salesforce REST API using OAuth

Hi,

 

I am new to OAuth and cloud development. I am trying to access my salesforce data using a web application. I am following the instruction from this link.

 

http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_REST_API

 

I am receiving an access token from salesforce, once i authorize the application to access my account. But when i use the access token to query data from my slesforce account, i get a HTTP 403 - forbiddden response. Am i missing something ? What are the alternate ways that can be used if not REST API ?

 

this is the URL i use to access my account via REST API.

 

https://ap1.salesforce.com/services/data/v20.0/query

My query parameter is this

params[0] = new NameValuePair("q",
                "SELECT Name, Id from Account LIMIT 100");
        get.setQueryString(params);

 

Thanks in advance.

Sanjay

 

SuperfellSuperfell

What does the response body say with that 403 response.

sanjayssnsanjayssn

This is the response body:

 

RESPONSE: BODY: [{"message":"The REST API is not enabled for this Organization."
,"errorCode":"API_DISABLED_FOR_ORG"}]

 

Is REST API still in pilot version ? How do i make it work ?

 

Thanks,

Sanjay

SuperfellSuperfell

Not all editions include API access, sounds like you might have Group or Profesional edition. (which don't have API access)

ila pambharila pambhar
I am facing same issue. Can you please suggest if any alternative solution for this?I have not enterprise account then how can i add lead from professional account?
 
ila pambharila pambhar
Can you please suggest if any alternative solution for this?I have not enterprise account then how can i add lead from professional account? I am getting 403 forbidden error  i have used REST API please tell any alternative way so i can resolve