• emacadie
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 10
    Replies

I know that refresh tokens only last two hours but access tokens last longer. My question is: how long do access tokens last? A month? A year? Forever?

 

 

 

 

We are working on a business intelligence/customer retention application. We are hoping to integrate our application with Salesforce via the REST API.

If one of our clients has a Salesforce account, we would like to be able to use the REST API to extract some of their data from Salesforce, enter it into our database, and perform analysis on it. We would like to be able to do update the data regularly. We would get a token from the user in order to do this.

I have been able to do this with a dev account. We would like to be able to make the Remote Access app available for other Salesforce users. How would we do this? Would we need a Pro account?

I discussed this with a Salesforce rep on the phone, and he did not seem to understand what I was talking about. He said we would have to build a portal. Perhaps he did not know about the REST API. He said that customers would probably not want to export their info out of Salesforce. I do not think this would be a problem since we could only do it with users' approval.

So how do I make my Remote Access app available to our users?

What timezone is used for the SOQL dates? Is it UTC? And if I am going to put a date in a query, what timezone should I convert  the dates in my query to?

 

Is there any limit/restriction on how many REST API calls we can make? Such as per hour/per day, etc?

 

Contact is a child of Account.

 

There are plenty of examples of getting Contacts from an Account. Is there an SOSL query that could tell me whether or not an Account has any Contacts? How can I quickly determine if an Account has not Contacts? If I were doing SQL, I would do something like this:

select account.id from account where account.id not in (select contact.accountid from contact)

 

Can we use REST do to Salesforce Object Search Language (SOSL) queries? Or can we only do SOQL right now?

 

I have a few questions about the example at http://wiki.developerforce.com/index.php/Getting_Started_with_the_Force.com_REST_API


It looks like we need three URLs:

 

1 for authorization (authUrl, where the user logs in to authorize the app to see their data: https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URI)
1 for getting the access and refresh tokens (tokenUrl: /services/data/v20.0/query)
1 for making REST calls (instanceUrl), which is na3.salesforce.com or na7.salesforce.com

Will these URLs change? Are they posted somewhere so we can make sure that what we have in our records are up to date?

I also have a few questions about the instance URL. I have two accounts that I am using. One seems to use na3.salesforce.com, and the other uses na7.salesforce.com. Are accounts linked to a particular instance? Will I need to keep track which user or account goes to which instance? Or can I pick a random instance?

I am trying to obtain an OAuth token.

 

I see that there is some Java code on http://www.salesforce.com/us/developer/docs/api_rest/Content/quickstart_oauth.htm, but it is not very useful. Is this a web app? A command line app? What packages are being imported? There are some variables put into the initParams array, but this array is never used as far as I can tell. Can this app be downloaded from somewhere?

 

 

We are working on a business intelligence/customer retention application. We are hoping to integrate our application with Salesforce via the REST API.

If one of our clients has a Salesforce account, we would like to be able to use the REST API to extract some of their data from Salesforce, enter it into our database, and perform analysis on it. We would like to be able to do update the data regularly. We would get a token from the user in order to do this.

I have been able to do this with a dev account. We would like to be able to make the Remote Access app available for other Salesforce users. How would we do this? Would we need a Pro account?

I discussed this with a Salesforce rep on the phone, and he did not seem to understand what I was talking about. He said we would have to build a portal. Perhaps he did not know about the REST API. He said that customers would probably not want to export their info out of Salesforce. I do not think this would be a problem since we could only do it with users' approval.

So how do I make my Remote Access app available to our users?

Is there any limit/restriction on how many REST API calls we can make? Such as per hour/per day, etc?

 

Contact is a child of Account.

 

There are plenty of examples of getting Contacts from an Account. Is there an SOSL query that could tell me whether or not an Account has any Contacts? How can I quickly determine if an Account has not Contacts? If I were doing SQL, I would do something like this:

select account.id from account where account.id not in (select contact.accountid from contact)

 

Team,

 

Did any one come across this link.

http://wiki.developerforce.com/index.php/Getting_Started_with_the_Force.com_REST_API

 

 

1)When I click to Run On Server, it is redirecting to http://localhost:8081 page.

I have configures https on my Tomcat Server.

 

I want to OFF http sever. How can I make it?

 

2)When i try to execute this, Html file executes and Salesforce link as provided in the HTMl page appears, but when I click on that link it is not redirecting me to Salesforce login page.

 

I am getting 404 error.

 

 

Kindly help me out with your suggestions.

 

 

 

Regards,

Charan 

  • April 14, 2011
  • Like
  • 0

I am trying to obtain an OAuth token.

 

I see that there is some Java code on http://www.salesforce.com/us/developer/docs/api_rest/Content/quickstart_oauth.htm, but it is not very useful. Is this a web app? A command line app? What packages are being imported? There are some variables put into the initParams array, but this array is never used as far as I can tell. Can this app be downloaded from somewhere?

 

 

While the API docs have a lot of great examples using cURL, I don't see an example of how to actually obtain the access token. I tried the following with no joy:

 

 

curl grant_type=authorization_code \
  client_id=MY-CONSUMER-KEY \
  client_secret=MY-CONSUMER-SECRET \
  https://na5.salesforce.com/services/oath2/token

 

 

Thanks

 

Jeff Douglas

Appirio, Inc.

http://blog.jeffdouglas.com

 

Author: The Salesforce Handbook