2016-09-18 22 views
0

我在終端中做了這個捲曲模式,它工作正常。將cURL語句轉換爲郵遞員以獲得令牌

curl -vvv -X POST \ 
    -d username=ben%[email protected] \ 
    -d password=1234asdf \ 
    -d grant_type=password \ 
    https://dem.better.co/oauth/token 

通過工作得很好,我的意思是它返回的access_token,token_type:承載和refresh_token。 我的問題是我如何重現此在郵遞員獲得等的access_token這是我把放在那裏: enter image description here

enter image description here 但我不斷收到此錯誤: enter image description here 我沒有把任何東西放在我的標題(不知道該怎麼做)。我的授權類型是OAuth 2 btw。請幫忙。非常感謝提前:-)

回答

0

錯誤聲明說你缺少一個必需的參數。你爲什麼不把用戶名,密碼和grant_type放在同一個請求中?