{"id":14961839,"url":"https://github.com/arduino/iot-client-go","last_synced_at":"2025-10-19T08:31:21.633Z","repository":{"id":43464882,"uuid":"203361553","full_name":"arduino/iot-client-go","owner":"arduino","description":"Go client for Arduino IoT API","archived":false,"fork":false,"pushed_at":"2024-10-25T07:36:26.000Z","size":1130,"stargazers_count":20,"open_issues_count":0,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-29T14:31:48.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.arduino.cc/reference/en/iot/api/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arduino.png","metadata":{"funding":{"github":["arduino"],"custom":"https://www.arduino.cc/en/Main/Donate"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-20T11:23:14.000Z","updated_at":"2024-10-25T07:36:30.000Z","dependencies_parsed_at":"2023-02-14T16:01:52.628Z","dependency_job_id":"d7f597d0-6e5f-43da-90bb-88a3bae6fc7a","html_url":"https://github.com/arduino/iot-client-go","commit_stats":{"total_commits":57,"total_committers":9,"mean_commits":6.333333333333333,"dds":0.5964912280701755,"last_synced_commit":"9a8412bedba6187d0de9150b815ebdd5fceab643"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arduino%2Fiot-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arduino%2Fiot-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arduino%2Fiot-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arduino%2Fiot-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arduino","download_url":"https://codeload.github.com/arduino/iot-client-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237092397,"owners_count":19254208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:27:55.593Z","updated_at":"2025-10-19T08:31:15.941Z","avatar_url":"https://github.com/arduino.png","language":"Go","funding_links":["https://github.com/sponsors/arduino","https://www.arduino.cc/en/Main/Donate"],"categories":[],"sub_categories":[],"readme":"# Arduino iot-api Go client\n\n## Getting Started\n\nThe client requires a valid access token to authenticate, you can use the\n`golang.org/x/oauth2` to easily get one with the Client Credentials OAuth2 flow:\n\n```Go\nimport cc \"golang.org/x/oauth2/clientcredentials\"\n\n// We need to pass the additional \"audience\" var to request an access token\nadditionalValues := url.Values{}\nadditionalValues.Add(\"audience\", \"https://api2.arduino.cc\")\nif organizationId != \"\" {\n    additionalValues.Add(\"organization_id\", organizationId)\n}\n// Set up OAuth2 configuration\nconfig := cc.Config{\n    ClientID:       clientID,\n    ClientSecret:   clientSecret,\n    TokenURL:       \"https://api2.arduino.cc/iot/v1/clients/token\",\n    EndpointParams: additionalValues,\n}\n// Get the access token in exchange of client_id and client_secret\ntok, err := config.Token(context.Background())\nif err != nil {\n    log.Fatalf(\"Error retrieving access token, %v\", err)\n}\n// Confirm we got the token and print expiration time\nlog.Printf(\"Got an access token, will expire on %s\", tok.Expiry)\n```\n\nFor a working example, see [the example folder](https://github.com/arduino/iot-client-go/tree/master/example) in this repo.\n\n## How to get Arduino IoT Cloud Client Credentials\n\nYou can generate Arduino IoT Cloud Client Credentials in the `ARDUINO API` section in the [IoT Cloud things section](https://create.arduino.cc/iot/things):\n\n### Step 1\n\n![IoT Cloud Site](https://github.com/arduino/iot-client-go/blob/master/img/selection_1.png?raw=true)\n\n### Step 2\n\n![IoT Cloud Site](https://github.com/arduino/iot-client-go/blob/master/img/selection_2.png?raw=true)\n\n### Step 3\n\n![IoT Cloud Site](https://github.com/arduino/iot-client-go/blob/master/img/selection_3.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farduino%2Fiot-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farduino%2Fiot-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farduino%2Fiot-client-go/lists"}