Specifying redirect_url when contacting salesforce rest api

I'm trying to contact the salesforce api from my rails app. I use omniauth-salesforce gem for oauth. When I'm initializing the OAuth2::Client, my options hash looks like below

{ :site => 'https://login.salesforce.com', :authorize_url => '/services/oauth2/authorize', :token_url => '/services/oauth2/token' }

Now, since my redirect url is dynamic, I would like to add that to the options hash when contacting salesforce, so it can pick up this dynamic url and send the access token back to this URL. Please let me know how to add this.

--------------Solutions-------------

Please have a look on the Force.com REST API toolkit. It contains the sample HTML Page which shows the way of passing the redirectURL. You can also see more details @ http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_REST_API

Category:rubygems Time:2012-04-09 Views:0

Related post

  • XML Parsing Error - Salesforce Bulk API using C# 2012-01-30

    I'm attempting to Create a Job and Add a Batch using the Salesforce Bulk API, but I receive an XML Parsing Error back from Salesforce. As advised in the Connecting to SalesForce bulk API using C# question, I'm using the partner WSDL to perform the lo

  • Error using Salesforce SOAP API with PHP - "An internal error has occurred" 2012-02-16

    Trying to use the Salesforce SOAP API with PHP. I am getting the following error on attempting to use any of the SForceEnterpriseClient methods. Error: An Internal Error Has Occurred. Stack Trace #0 [internal function]: SoapClient->__call('retriev

  • Accessing Salesforce Webservice API using C# 2009-10-07

    I havent worked with that Salesforce API before, so I am a bit stuck on how to connect to the salesforce service. So far I understood that I have to generate a wsdl file for my account or rather the account of my customer (step 1). So far, so good. B

  • Create Pages in Salesforce Using API 2010-11-14

    I am looking for creating Forms or Pages in Salesforce using APIs (REST/SOAP). Is it possible to create them dynamically or is it always modelled through VisualForce ? Any Ideas will be helpful. Regards, Srinivas --------------Solutions-------------

  • salesforce rest api INVALID_SESSION_ID error 2011-05-23

    I am using salesforce rest api to access the salesforce account from my rails app.I created a remote access app and got the key N the id. I was able to authenticate the user and get the auth_token, instance url and all that. But, when I send request

  • Does the Salesforce REST API callback url need to be HTTPS? 2011-09-10

    I have been trying to connect to the Salesforce REST API but am not having very much luck. The Salesforce REST API Quick Start Guide states that an HTTPS callback url is required, but then in the example they use https://localhost:8443/RestTest/oauth

  • Salesforce Metadata apis 2012-02-06

    I want to rerieve list of Metadata Component's like ApexClass using Salesforce Metadata API's. I'm getting list of all the Apex Classes(total no is 2246) that are on the Salesforce using the following Code and its taking too much time to retrieve the

  • Salesforce Bulk Api gem? 2012-02-20

    I have read about databasedotcom gem but it doesn't support bulk api. Are there any salesforce bulk api gem that uses Oauth2 for login? --------------Solutions------------- sudo gem install salesforce_bulk_api https://github.com/yatishmehta27/salesfo

  • Best Practice for Salesforce.com API authentication for background apps 2012-04-02

    The Salesforce.com API seems to assume that you will always use the app as an active user. Their authentication methods (Session ID and OAuth) support this as they both require an authenticated user to "do something". What is the strategy for when yo

  • Salesforce REST API Query More than 2000 2012-05-02

    I'm trying to execute a SOQL query using salesforce REST API which will return 2,749 results. However it seems there is a limit of 2,000 results that can be returned for a given request. Is there a way to query the remaining 749 results without using

  • Salesforce PHP API Create Attachment | Error: INVALID_TYPE: Must send a concrete entity type 2013-01-14

    I am using the Salesforce PHP API. I can connect to SF and get information like a Lead ID based on an email address. When attempting to create an attachment I am receiving this error: INVALID_TYPE: Must send a concrete entity type. I have tried sever

  • CF8 and Salesforce REST API - updating records 2011-07-29

    I'm trying to do integration with Salesforce using their REST API and CF8. I got the OAuth bit working, getting data etc but now I'm trying to update some records in Contact table. First I tought about doing it the "proper" way as their docs say - Up

  • How to use 'Replace' function in SalesForce SOAP API in C# 2014-12-29

    I am using SalesForce SOAP Enterprise WSDL API in my C# application. What I came across is the need to use the SELECT query which includes REPLACE function. I tried Developer Console>>Query Editor by executing the following query, but it's givi

  • Querying over 1,000,000 records using salesforce Java API and looking for best approach 2010-02-10

    I am developing a Java application which will query tables which may hold over 1,000,000 records. I have tried everything I could to be as efficient as possible but I am only able to achieve on avg. about 5,000 records a minute and a maximum of 10,00

  • Using "ContactsQuery" for searching particular contact in Google contact using Google API Ver 2 2010-04-17

    Currently i am searching particular as below: Feed<Contact> f = contactsRequest.GetContacts(); foreach (Contact e in f.Entries) { if (e.Title == "MyContact") { MesageBox.Show("Contact already exist"); } } This will work fine if no of contacts a

  • Problem adding Contact with new API 2010-05-28

    I am trying to add a new contact to my contact list using the new ContactContract API via my application. I have the following method based on the Contact Manager example on android dev. private static void addContactCore(Context context, String acco

  • Get Postal address from a contact using ContactsContract api on android 2010-08-31

    I am using ContactsContract api intent for showing all contacts from an activity. This intent returns an id of the contact. I need to get the postal address of this contact. Here is the code which i am using for showing contacts: Intent intent = new

  • php : How to send lead forms to salesforce.com api? 2010-11-08

    I am new to php and salesforce api. I have given an assignment in which I have to send the lead forms to salesforce api. My organization have a salesforce account but I have no idea how to implement salesforce api in php. Can anyone please help me on

  • How to do a partial update on contacts using Google API Java client? 2011-01-14

    I'm using the lightweight Google API Java client to modify contacts. There are a few samples for the API showing how to do partial updates (i.e. via HTTP PATCH), but Google Contacts specifically doesn't seem to support PATCH . The docs also specify t

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.707 (s). 13 q(s)