誰能告訴我這是爲什麼錯誤的請求400錯誤的請求 - https://accounts.google.com/o/oauth2/token
var searchurl = "https://accounts.google.com/o/oauth2/token";
$.ajax({
dataType: "json",
url:searchurl,
context: {code:auth_code, client_id:'clientid', client_secret:'secret', redirect_uri:'http%3A%2F%2Flocalhost:8085%2FGmailIntegration%2FgetAuthResponse.jsp', grant_type:'authorization_code'},
type:"POST",
contentType:"application/x-www-form-urlencoded",
success:function(data) {
alert(data);
},
error: function(jqXHR, exception) {
console.log(jqXHR);
}
});
歡迎來到StackOverflow!引起人們對未解決問題的關注的正確方法是編輯問題並加以改進(澄清問題,對問題進行格式化,看看是否可以清楚地說明問題,而不需要額外的長度)。不要發佈重複的問題。 –
[400發送錯誤的請求時發送http post請求從授權代碼獲取令牌可能的重複?](http://stackoverflow.com/questions/20219994/400-bad-request-when-sending-http-post-request-從認證代碼中獲取令牌) –