API GPX upload OAuth2 failiure - What do I need to change?

I’m was using Curl & the API within a script to upload GPX to the server but I’m now getting the error
HTTP Basic Authentication is disabled:

What do I need to amend to make it OAuth2 compatible?

curl -u UName:PWord -H Expect: -F "file=@ %NewFileName%" -F description=%Description% -F tags=%Description% -F visibility=identifiable https://www.openstreetmap.org/api/0.6/gpx/create

1 Like

I am a terrible person to respond to this topic as I have never attempted such a thing, but this got me curious and a response might bump the thread. I assume you have seen the (language agnostic) information on the wiki?

From the sounds of it if suitable gobbledegook is used for the redirect URI it should be possible to use a normal web browser for steps 1-4 and manually copy-paste the resulting code into the curl request for step 5.

Sounds like curl should be able to pass the required header OK from what’s shown on this page. Would that change things much from what you were doing before?

Policy-wise are all scripts meant to be tested against the dev server first?

Did you ever get this to work?

Yes. I was planning to write it up. Thanks for the reminder. It was a bit of a palaver - why do all developers assume no ones uses Windows?!
Give me a couple of days.

2 Likes

Because apparently if you spend 6 years memorising the guts of linux you start to think that it’s somehow easier than an OS that doesn’t require you to be able to do laparoscopic surgery in order to fix anything that goes wrong and doesn’t require you to recompile all your organs in order to get two programs to play nice with each other.

1 Like