Nekmo / amazon-dash

Hack your Amazon Dash to run what you want.
MIT License
829 stars 67 forks source link

Access password-protected URL #41

Closed WayneManion closed 6 years ago

WayneManion commented 6 years ago

I'd like the script to GET a password-protected URL when the button is pressed. Is this supported in the script or do I have to run a wget with the user name and password in the command?

Thanks

Nekmo commented 6 years ago

Hello, you have two ways with the current version (for basic auth authentication):

# amazon-dash.yml
# ---------------
settings:
  delay: 10
devices:
  AC:63:BE:67:B2:F1:
    name: Url example
    url: 'http://domain.com/path/to/webhook'
    headers: {"Authorization": "Basic QWxhZGRpbjpPcGVuU2VzYW1l"}
  AC:63:BE:67:B2:F2:
    name: Cmd example
    cmd: "curl -u user:pass http://domain.com/path/to/webhook"

QWxhZGRpbjpPcGVuU2VzYW1l is Aladdin:OpenSesame in base64.

However this new option is a good idea and will be added in the next release.

Greetings.

Nekmo commented 6 years ago

This is now fixed on Develop branch :+1: