2016-09-27 75 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