I am struggling creating an oauth2 token.
Here’s what I tried:
- On openstreetmap.org, I went to → My Settings → OAuth 2 applications
- Clicked “Register new application”
3a) entered name
3b) entered “urn:ietf:wg:oauth:2.0:oob” for Redirect URL
4a) Did not modify “Confidential application?” so it was clicked
4b)_ Ticked ALL permissions - Clicked “Register Application”
- I was presented with a client id and client secret
- Went to a shell and defined the variables
CLIENT_ID="...."
CLIENT_SECRET="..."
- Still in the shell:
DOMAIN="https://master.apis.dev.openstreetmap.org"
AUTHORIZATION_ENDPOINT=$(curl --silent $DOMAIN/.well-known/oauth-authorization-server | jq --raw-output '.authorization_endpoint')
TOKEN_ENDPOINT=$(curl --silent $DOMAIN/.well-known/oauth-authorization-server | jq --raw-output '.token_endpoint')
-
still in the shell: Determined Authorization Endpoint like so:
echo $AUTHORIZATION_ENDPOINT?response_type=code&client_id=$CLIENT_ID&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=read_prefs
-
Opened browser at given URL:
-
I was asked to enter username and password.
-
When I entered these, I was denied access with the somewhat meaningless error message “Sorry, could not log in with those details.”
I am now lost. How am I supposed to proceed?