2013-06-18 26 views
0

我正在按照google提供的文檔使用API​​訪問gmail。根據谷歌文檔,我們需要訪問令牌來管理Gmail。在創建令牌請求時獲取invalid_client響應

所以我試着通過閱讀下面給出的文檔鏈接來創建一個訪問令牌。

Link1: - developers.google.com/accounts/docs/OAuth2WebServer,基於此文檔創建了URL1。

Link2: - code.google.com/p/google-mail-oauth2-tools/wiki/OAuth2DotPyRunThrough,基於此文檔創建的URL2。

URL1: - https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=%2Fprofile&redirect_uri=http%3A%2F%2Flocalhost%2Fstudy%2Fgmail-access%2Foauth2-php-samples%2Foauth2.php&response_type=code&client_id=XXXXXXXXXXXXXXX.apps.googleusercontent.com&approval_prompt=force

URL2: - https://accounts.google.com/o/oauth2/auth?client_id=XXXXXXXXXX.XXXXapXps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%2Fstudy%2Fgmail-access%2Foauth2-php-samples%2Foauth2.php&response_type=code&scope=https%3A%2F%2Fmail.google.com%2F

我得到的這兩個請求無效客戶端的響應。請幫我找出導致無效客戶端響應的原因。

回答

相關問題