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
WEN JIEWEN JIE 

Questions about Remote Access CallbackURL

Hello,

 

I need to do a POC about Chatter Connect function. And I have read the Chatter REST API Developer's Guide. I have some understanding of the OAuth2.0 and cURL tools.

 

But I don't know how to specify the "Callback URL" when I create a new remote access.

And if I have a java application, how could I connect it with Chatter.

 

Could anyone can answer my questions?

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
cloudcodercloudcoder

I removed your post. You should never post consumer secrets, and passwords to public forum. Please reset your password immediately. Your msg will likely be cached somewhere on the web.

 

Your question was around using cURL. The trick is to include params in single quotes:

 

curl https://login.salesforce.com/services/oauth2/token -d 'grant_type=password&client_id=abcd&client_secret=12345&username=fred@flintstone&password=mypassword'

All Answers

cloudcodercloudcoder

The callback URL can be anything you like - it all depends on you end application and how you intend to handle a successful oauth request.

 

Few things to note:

 

1. Your callback URL in your app must match that specified in the Remote Access provider you configure in Force.com

2. For mobile applications, the callback url doesn't make much sense (vs. a web server). I suggest you use sfdc://success

3. You can use http when working on localhost, but will require https for public webapps

 

 

WEN JIEWEN JIE

Thanks Wall!

I will try it as your suggestion.

cloudcodercloudcoder

I removed your post. You should never post consumer secrets, and passwords to public forum. Please reset your password immediately. Your msg will likely be cached somewhere on the web.

 

Your question was around using cURL. The trick is to include params in single quotes:

 

curl https://login.salesforce.com/services/oauth2/token -d 'grant_type=password&client_id=abcd&client_secret=12345&username=fred@flintstone&password=mypassword'

This was selected as the best answer
WEN JIEWEN JIE

I execute the url just like your example in cmd, and set the client_id,client_secret,username,password as my info. The cmd show a error message as "{"error":"unsupported_grant_type","error_description":"grant type not supported"}".

I don't know why this error happened. And is this command "-d" belong curl?