9

I have seen information about using Token with SOAP API, but REST API documentations doesn't say anything about it. Did anybody find useful hints on getting Token to work with Rest API?

1
  • For reference, when using the SOAP API the Client ID / Token goes in the CallOptions.client. The ones I've seen typically end in a '/'. – Daniel Ballinger Aug 2 '12 at 2:58
7

If you have a partner app you should now be able to get your OAuth client whitelisted for api access, talk to your contact in the partner group.

Source: Does the REST API support Client ID?

7

Here is our experience of getting Import2 app working with Group and Professional editions:

Preparation steps:

  • You have to be Salesforce ISVForce partner
  • Your app has to pass security review
  • Your app is actually working on other editions that have API enabled.

Step 1. Login into your Developer org that you have used to create the app. and goto Setup ➤ Develop ➤ Remote Access. Create or click on the app that you want to whitelist. Copy paste the URL of Remote Access app, as you would need that when submiting a Case.

Step 2. Find your Developer Org Id. NB! it's an org where your app is registered, not the GE Org you are trying to connect. To find it go to Setup ➤ Administration Setup ➤ Company Profile ➤ Company Information ➤ Salesforce Organization ID

Step 3. Create an org to test if you have an access or not. We were getting different results on Test Org created through Partner Portal vs the org we created by requesting Group Edition trial on Salesforce page. Trust me, you would need that to test if your app was already whitelisted or not ;)

Step 4. Now submit a Case in partner portal. Use Case Type: AppExchange & Services Listing, Sub Type: Enable REST API for GE/PE Org. Be sure to mentioned your Remote Access id and Org ID that you have found during steps 1 and 2.

Step 5. We were informed that it takes 24 hours after you get notification that your app is whitelisted, but actually it took 3-4 days for us until Group Edition access actually started to work.

Hope it helps

3
  • Great answer, thanks for the detailed steps and criteria! – RichVel Mar 23 '14 at 5:52
  • @Mark Kofman: Is this only applicable for SOAP API or for REST API also ? – arjun singh Jul 24 '14 at 9:04
  • Step 4: Use case type API Token and sub topic API Token Request – Brett Jun 30 '16 at 21:19
3

What token are you referring to? If you've gotten the API enabled in the edition (which is a conversation with Salesforce support/Account Exec I think) - it should work the same as described in this OAuth article:

http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com

The access token here is the same as the session ID being used in the SOAP API. However, the biggest difference is that if you are calling the REST API via the salesforce domain with JavaScript ... you'll hit cross-domain issues which don't effect the old SOAP AJAX toolkit. However, you can either use the JS REST Toolkit:

https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit/

Or if you have access to Visualforce (which I'm assuming if you're trying that) - @RemoteAction as jordan.baucke suggests (which does not require a API call).

2
  • Yeah, I guess I was referring to within SFDC where it's the most difficult. Having the API enabled should help you from outside of SFDC, where you can assign it dynamically, but within SDFC there isn't a good way to apply it. – jordan.baucke Jul 31 '12 at 21:32
  • Yeah, the cross-domain issue batters a lot of use cases. For instance, REST-based Flex (in VF) is basically impossible, but REST-based AIR (Desktop) works just fine, even with the exact same code. – joshbirk Jul 31 '12 at 21:53
1

We've had long conversations with SFDC about this, no, there is no documentation to my knowledge.

Just vague references to using it to allow API access in Group/PE.

You can however use @RemoteAction annotated methods if you want to do some Ajaxy calls in your VF pages (that's the way we've done it)

1

You either need to have API access enabled on Group/PE (there is a fee for it) or be an approved AppExchange application to be able to use the REST API on Group or Professional Edition.

1
  • 1
    For the SOAP API the client ID in the CallOptions is how you identify yourself as an AppExchange approved application (with API access to Professional Edition). I believe the question was if there is an equivalent setting in the REST API. – Daniel Ballinger Aug 2 '12 at 3:02

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.