2

I am fairly new to REST concepts

I want to obtain access token for Dailymotion. I am following http://www.dailymotion.com/doc/api/authentication.html

I am using a REST client called POSTMAN on Chrome to test the responses. Step 3 in the link http://www.dailymotion.com/doc/api/authentication.html says I need to pass the authorization code obtained in Step 2. The authorization code is a HTML code that I have obtained. I have tried putting the exact same code in Step 3 and making a POST request, but it gives a "Invalid authorization code" error.

user3392740
  • 445
  • 2
  • 7
  • 19

1 Answers1

2

It works for me. Here is the screenshot of mine. (authorization code can only be used one time, and lifespan is very short, about 10 mins, you can get a new code and try again)

enter image description here

Owen Cao
  • 7,955
  • 2
  • 27
  • 35
  • Thanks for the reply. The authorization code returned is a HTML code in Step 2. What value should I put in for code in Step 3 – user3392740 May 23 '14 at 03:30
  • 1
    The authorization code is returned appending the redirectURL. For example: `http://yumidea.com/?code=bcda1fb47acf24b0f636dd5b9976255ee7b6b357&scope=read&uid=x1f7vkv&sig=1ee1e40fcf02e68fdec774663d6098db` You'd use `bcda1fb47acf24b0f636dd5b9976255ee7b6b357` – Owen Cao May 23 '14 at 03:57