Go Client Library for ClearBlade IoT Core API.
Create a service account in your project and download the credentials .json file.
To authenticate API requests you can use one of two options:
-
Define an environment variable named
CLEARBLADE_API_CREDENTIALS_JSONand the value is the JSON payload of the service account.Example:
export CLEARBLADE_API_CREDENTIALS_JSON='{"systemKey": "...","token": "...","url": "...","project": "..."}' -
Define an environment variable named
CLEARBLADE_CONFIGURATIONwhich represents the path to the credentials .json file.Example:
export CLEARBLADE_CONFIGURATION=/path/to/file.json
See the Authorization documentation for authorizing sdk with clearblade iot-core
View the Go sections of these Samples