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
mukesh guptamukesh gupta 

Connected App

Hi Expert,

I am some confused about callback_url in connected App. Can you please tell be about this with a simple example. I wanrt to add this "callback_url" in "redirectURI" for authitication.
 

Thanks
 
NagendraNagendra (Salesforce Developers) 
Hi Mukesh,

Whenever you create a connected app you must have to supply a callback URL,  which is used to retrieve the access token during the initial authentication process.

The Salesforce connected app and callback URL are interconnected, The Connected app needs the website’s callback URL. The website needs the connected app URL. For now, specify a placeholder. You can come back later to replace it with the correct URL.

Please let us know if any further explanation is required.

Thanks,
Nagendra
mukesh guptamukesh gupta
Hi Nagendra,

I need some help from your side.  I am creating a page in angularjs and now integrate with salesforce. but not get success . where i am doing wrong
Please suggest. 
 
var clientId = "3MVG98dostKihXN5oBoP6A3TICyfESSuhfgfgq8XH4PuqTtB.pxOTyitM4r46cHGX2d1tXRl4Jp0Axho9P";
     var consumerSecret = "238837657107141703";
     //Authorization endpoint
     var authEndPoint = "https://test.salesforce.com/services/oauth2/authorize";
     //response_type must be set to token
     var responseType = "token";
     //This is the callback URL from the connected app
     var redirectURI = "sfcalltrackerapp://oauth-callback";
     //Construct the URL with the required parameters
     var requestURL = authEndPoint+'?client_id='+clientId+'&response_type='+responseType+'&redirect_uri='+redirectURI;

     
   
    $http.post(requestURL).
            then(function (response) {
            var url = "https://cs1.salesforce.com/services/apexrest/v1/CallEvent?CalledIdName=mukesh";

          $http({method : 'POST',url : url, 
                    headers: { 'Authorization: Bearer access_token'}})
             .success(function(data, status) {
               debugger;
             })
            .error(function(data, status) {
                debugger;
              
                //debugger;
                //alert(data.value);
            });

    });