Skip to content

Commit

Permalink
Add support Service Account JSON file for authentication.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Feb 1, 2023
1 parent c85d721 commit 4fc0f89
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,28 @@ param **`project_id`** (string) The project ID.

param **`private_key`** (string) The Service Account's private key.

param **`eth`** (optional for ESP8266 only) The pointer to ESP8266 lwIP network class e.g. ENC28J60lwIP, Wiznet5100lwIP and Wiznet5500lwIP.

```cpp
void begin(<string> client_email, <string> project_id, <string> private_key, <ESP8266_spi_eth_module> *eth = nullptr);
```
#### Begin the Google API authentication.
param **`service_account_file`** (string) The Service Account's JSON key file.
param **`storage_type`** (esp_google_sheet_file_storage_type) The JSON key file storage type e.g. esp_google_sheet_file_storage_type_flash and esp_google_sheet_file_storage_type_sd.
param **`eth`** (optional for ESP8266 only) The pointer to ESP8266 lwIP network class e.g. ENC28J60lwIP, Wiznet5100lwIP and Wiznet5500lwIP.
```cpp
void begin(<string> client_email, <string> project_id, <string> private_key);
void begin(<string> service_account_file, esp_google_sheet_file_storage_type storage_type, <ESP8266_spi_eth_module> *eth = nullptr);
```



#### Set the OAuth2.0 token generation status callback.

param **`callback`** The callback function that accepts the TokenInfo as argument.
Expand Down

0 comments on commit 4fc0f89

Please sign in to comment.