Skip to content

OdenTech/go-iot

 
 

Repository files navigation

Cloud IoT API

ClearBlade IoT Core API's Go client library Go Reference

Setting up service account credentials

Create a service account in your project and download the credentials .json file.

To authenticate API requests you can use one of two options:

  1. Define an environment variable named CLEARBLADE_CONFIGURATION which represents the path to the credentials .json file. Example:

    export CLEARBLADE_CONFIGURATION=/path/to/file.json
    
  2. Pass in credentials via the Service options:

    credentials := `{"systemKey":"systemkeyhere","token":"tokenhere","url":"https://iot.clearblade.com","project":"test"}`
    
    service, err := iot.NewService(ctx, iot.WithServiceAccountCredentials(credentials))
    if err != nil {
      return err
    }
    

Authorization

See the Authorization documentation for authorizing SDK with ClearBlade iot-core.

API Documentation

View the Go sections of these Samples.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%