summaryrefslogtreecommitdiffstats
path: root/server/hack
diff options
context:
space:
mode:
authorRutger Broekhoff2026-08-28 18:03:05 +0200
committerRutger Broekhoff2026-08-28 18:03:05 +0200
commit973aec43ea54bbf95b64fbcb636403401d1ca60e (patch)
tree41b7911c420766a9b463245b9296f44c5bf35258 /server/hack
downloadroutemon-973aec43ea54bbf95b64fbcb636403401d1ca60e.tar.gz
routemon-973aec43ea54bbf95b64fbcb636403401d1ca60e.zip
Import from e4b104792206ee7ea64bf39c6b7d2c0c230f9d14
Diffstat (limited to 'server/hack')
-rwxr-xr-xserver/hack/rwgps-get-auth-token.sh14
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
3rwgps_api_key="$(jq <config.json '.rwgps.api_key' -r)"
4
5echo -n "RWGPS account email: "
6read rwgps_email
7echo -n "RWGPS account password: "
8read rwgps_password
9
10jq -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
14echo