#!/usr/bin/sh oauth2c \ --client-id $OAUTH2_ID \ --client-secret $OAUTH2_SECRET \ --grant-type authorization_code \ --redirect-url "https://localhost:9876/callback" \ --scopes "read_prefs,write_api" \ --callback-tls-cert "$(pwd)/tmp/domain.crt" \ --callback-tls-key "$(pwd)/tmp/domain.key" \ --auth-method "client_secret_basic" \ --response-types "code" --response-mode "query" \ "https://api.openstreetmap.org" \ | jq '{ osm_session: . }' > session.json # at the end # cp session.json ~/.local/share/bobosm/session.json