Find your content:

Search form

You are here

java desktop example user agent flow OAuth


We would want to use the user agent flow for our desktop application that we connect to Salesforce via the REST API.

Does anyone have somewhere a working java example of this or point me in the good direction with more information on how this works for desktop applications? Most information that I find is about web applications connecting to Salesforce but not so much for desktop apps.

Thanks in advance!

Attribution to: KoenVM

Possible Suggestion/Solution #1

This seems to be a good resource for libraries out there. In which I found what seems to be quite a popular Java library called Scribe. It does not list Salesforce oAuth support, but in theory it should work just as well as any of the others claimed to be supported.

Update: It appears that there has been some activity around using this library with the Salesforce oAuth implementation see here.

Scribe is a mature OAuth library for Java by Pablo Fernandez that is intended to work with all APIs. It has been featured in LinkedIn's developers forums and works with Google, Yahoo, LinkedIn, Twitter, and Foursquare APIs out of the box.

OAuthService service = new ServiceBuilder()

Attribution to: Andrew Fawcett
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content