0

I created a trial account on Salesforce

Developed an Android app using Trailhead: https://trailhead.salesforce.com/mobile_sdk_native_android/mobilesdk_android_getting_started

When I try to login using the Email and Password, it logs in fine but the Fetch Contacts and Fetch Accounts throw this error:

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

The Developer account I used to create the Connected App, has API Enabled and it works fine with the Saleforce1 App.

Somewhere I read:

To be able to use the Rest APIs we need to login with Username(not Email). Which is not the case with Salesforce1 App. Because most of the Users will not have a Username.

And I don't find a way to add a Username. The link under my profile icon which says Add Username keeps asking for login and never actually prompts to create Username.

4
  • What edition did you create for your trial? It has to be enterprise or above to have the API enabled. – Eric Feb 8 '17 at 15:52
  • @Eric Where do I check that? I don't remember choosing any such option. 1. Does the API enable issue depend on the Account I created to connect app and get the Customer Key? or the Account I am using to log into the Trailhead app? 2. Like I mentioned in the question - The account I am using to login works fine on Salesforce1 app with both email and username. But on the Trailhead app it doesn't work with email, however it works with Username. – Archie.bpgc Feb 9 '17 at 4:31
  • Setup -> Company Profile -> Company Information -> look for "Organization Edition" – Eric Feb 9 '17 at 6:43
  • Professional Edition. How do I change that? – Archie.bpgc Feb 9 '17 at 17:24
0

What edition did you create for your trial? It has to be enterprise or above to have the API enabled.

To Check:

Setup -> Company Profile -> Company Information -> look for "Organization Edition"

Since from your comment your are on PE edition, you will need to create a new trial org and ensure you are selecting Enterprise or above

9
  • "you will need to create a new trial org and ensure you are selecting Enterprise" a new signup? – Archie.bpgc Feb 9 '17 at 17:29
  • @Archie.bpgc - yup – Eric Feb 9 '17 at 17:29
  • salesforce.com/form/signup/freetrial-sales.jsp where is the option to choose the edition? I tried from salesforce.com/editions-pricing/sales-cloud clicking on Try For Free under Lightning Enterprise, but it still created a Professional Edition. Also I suppose this is for the account that is going to create the connected app and the customer key right? not the account that tries to use the API. – Archie.bpgc Feb 9 '17 at 18:12
  • If you are developing an application you should probably obtain a Developer Edition from developer.salesforce.com – Eric Feb 9 '17 at 20:14
  • That created a Developer Edition. Even now the same issue exists. I could login with Username and Email both but for Email Fetch Contacts always throw "API_DISABLED_FOR_ORG" error. It works fine with the Username. – Archie.bpgc Feb 10 '17 at 2:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.