diff options
| author | Rutger Broekhoff | 2026-08-28 18:03:05 +0200 |
|---|---|---|
| committer | Rutger Broekhoff | 2026-08-28 18:03:05 +0200 |
| commit | 973aec43ea54bbf95b64fbcb636403401d1ca60e (patch) | |
| tree | 41b7911c420766a9b463245b9296f44c5bf35258 /server/hack/rwgps-get-auth-token.sh | |
| download | routemon-973aec43ea54bbf95b64fbcb636403401d1ca60e.tar.gz routemon-973aec43ea54bbf95b64fbcb636403401d1ca60e.zip | |
Import from e4b104792206ee7ea64bf39c6b7d2c0c230f9d14
Diffstat (limited to 'server/hack/rwgps-get-auth-token.sh')
| -rwxr-xr-x | server/hack/rwgps-get-auth-token.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/hack/rwgps-get-auth-token.sh b/server/hack/rwgps-get-auth-token.sh new file mode 100755 index 0000000..d7a14a5 --- /dev/null +++ b/server/hack/rwgps-get-auth-token.sh | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | rwgps_api_key="$(jq <config.json '.rwgps.api_key' -r)" | ||
| 4 | |||
| 5 | echo -n "RWGPS account email: " | ||
| 6 | read rwgps_email | ||
| 7 | echo -n "RWGPS account password: " | ||
| 8 | read rwgps_password | ||
| 9 | |||
| 10 | jq -nc --arg email "$rwgps_email" --arg password "$rwgps_password" \ | ||
| 11 | '{"user": {"email": $email, "password": $password}}' \ | ||
| 12 | | curl --json @- -H "x-rwgps-api-key: $rwgps_api_key" \ | ||
| 13 | https://ridewithgps.com/api/v1/auth_tokens.json | ||
| 14 | echo | ||