Google Custom Search

2021/01/30

bigquery table from google datasheet, access via api using php, need to specify scopes

 當使用php 存取 bigquery table 是從google sheet 來的時候,在初始化BiguqeryClient時,要指定scope


$bigQuery = new BigQueryClient(['projectId' => $projectId, 'scopes'=>[
'https://www.googleapis.com/auth/bigquery',
'https://www.googleapis.com/auth/cloud-platform',
'https://www.googleapis.com/auth/drive']
]);