1
我試圖使用Cortana的連接帳戶獲得優優訪問OAuth。複製grant_type參數優步API
認證數據所需的所有必要信息,諸如auth url,令牌url,客戶機密碼等都是從Uber API描述中提取出來的,並傳遞給Cortana,所以她必須爲我做所有低級別的工作。
但是,當我試圖登錄到尤伯杯,我receving這樣的答案:
"error": "The token response status code was not 200.",
"serviceRequest": {
"Host": "login.uber.com",
"Headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic VXF6cGVzeWVwYXFPZDBrc0FsUTh3U0dTHFvb2k6TFg0TWFhVDRwU0NFNlM3ZDJVMGJSdlU0VnJhTnRncFJPVlo4UkNqQg=="
},
"Method": "POST",
"Path": "/oauth/v2/token",
"UrlParameters": {
"redirect_uri": "https://www.bing.com/agents/oauth",
"grant_type": "authorization_code",
"code": "some code private here :)"
},
"PostData": "redirect_uri=https%3a%2f%2fwww.bing.com%2fagents%2foauth&grant_type=authorization_code&code=SOME_AUTHORIZATION_CODE"
},
"serviceResponse": {
"Headers": {
"Connection": "keep-alive",
"Pragma": "no-cache",
"X-Uber-App": "login",
"Strict-Transport-Security": "max-age=604800",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Cache-Control": "no-store",
"Date": "Sat, 28 Oct 2017 10:30:57 GMT",
"Set-Cookie": "session=421370309da06baf_59f45c61.RKb0a7144yyiV9HlZgssA5ZvSqE; Domain=login.uber.com; Secure; HttpOnly; Path=/",
"Server": "nginx",
"Content-Length": "84",
"Content-Type": "application/json"
},
"StatusCode": 400,
"ResponseData": "{\"error_description\": \"Duplicate grant_type parameter.\", \"error\": \"invalid_request\"}"
},
正如你所看到的,在財產ResponseData
我有一個錯誤:Duplicate grant_type parameter.
什麼可能它是?
是的,你說得對,這是相同的代碼。但這不是我重複他們。 Cortana提出的要求,據我所知,我不能影響其內容。 因此,一般來說,看起來就像Cortana的工作原理 - 這項服務重複請求中的參數。 – Ivan