Goal: Integration with Jawbone OAuth in Grails.
Hi Guys! I would like to share with you a very interesting way to connect with Jawbone, which I found when I need to implement this with my application. To achieve this follow below steps:

Step 1 :
Visit Jawbone developers page.
Step 2 :
Sign up and create your account and Login to your account.
Create New App to connect with your website
Fill the required details.
It will provide you client Id and Client Secret(or App Secret).

Step 3 :
Now hit at below urls by exchanging your values which you got after creation of app at Jawbone:

URL 1 :
“https://jawbone.com/auth/oauth2/auth?response_type=code&client_id=ClientId&redirect_uri=Redirect_URI&scope=extended_read move_read move_write”
Output : It will return code in response which will be further used in URL 2.

URL 2 :
“https://jawbone.com/auth/oauth2/token?grant_type=authorization_code&client_id=ClientID&client_secret=AppSecret&code=Code(Above param code)”
Output : It will give a JSON response to you which contains following data :


Step 4 :
Now create a diffrent user account at Jawbone and fill details like your pic,steps.

Step 5 : Hit on this URL to fetch user deatils from Jawbone.

URL 3 :

Map map=new HashMap()
def http = new HTTPBuilder('https://jawbone.com')
 http.request(Method.GET, ContentType.JSON) {
                  uri.path = '/nudge/api/v.1.1/users/@me'
                  uri.query = [ v:'1.0', q: 'Calvin and Hobbes' ]
                  headers.'Authorization' = "Bearer access_token"
                  // response handler for a success response code
                  response.success = { resp, reader ->

map will contain all details of user.