arduino / iot-client-py

Python client for Arduino IoT API
https://www.arduino.cc/reference/en/iot/api/
Other
23 stars 12 forks source link

updated main.py example , created token_request.py example #45

Closed akash73 closed 3 years ago

akash73 commented 3 years ago

Hi, I was getting some errors running the original code. I've updated the main.py example make it more readable and added some comments to the code. I've created the token_request.py example according to the documentation.

akash73 commented 3 years ago

not sure why it fails the check. Is working on my Mac. I'm closing this PR and will reopen it .

per1234 commented 3 years ago

@akash73 for security reasons, secrets access is disabled when a workflow is triggered by a PR submitted from a fork. So these environment variables are not defined in the GitHub Actions runner: https://github.com/arduino/iot-client-py/actions/runs/579414126/workflow#L33-L34

          CLIENT_ID: ${{ secrets.CLIENT_ID }}
          CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}

If you create a branch in this repository and submit the pull request from that, then runner will have access to those secrets.

akash73 commented 3 years ago

thanks @per1234 , will do