2016-09-27 31 views
1

如果我嘗試這樣入門PERMISSION_DENIED當試圖訪問谷歌與表API密鑰

https://sheets.googleapis.com/v4/spreadsheets/1p7sFt.....gRu9A/values/Sheet!1A1:L7?key=AIza.....oTXg it works. 

基本spreadsheets.values.get請求獲得來自谷歌表的數據,但是,如果我增加更多的參數到請求失敗。 例如:

https://sheets.googleapis.com/v4/spreadsheets/1p7sFt.....gRu9A/values/Sheet1!A1:L7**?majorDimension=COLUMNS**?key=AIza.....oTXg 

和回報:

{ 
    "error": { 
    "code": 403, 
    "message": "The request cannot be identified with a client project. Please pass a valid API key with the request.", 
    "status": "PERMISSION_DENIED" 
    } 
} 

回答

1

使用符號&多個查詢字符串參數,而不是多個?

https://sheets.googleapis.com/v4/spreadsheets/1p7sFt.....gRu9A/values/Sheet1A1:L7**?majorDimension=COLUMNS**&key=AIza.....oTXg