This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

which POST request headers to use for OSM Basic Authentication?

2

Hi,

I have a problem with basic authentication in OSM. To upload gps traces it is required.

So it would be great if someone can paste the headers with message body of 'upload traces' POST request.

Thanks in advance !

asked 14 Dec '12, 16:08

buddhima's gravatar image

buddhima
1166711
accept rate: 0%

edited 23 Jul '13, 01:57

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

1

It's easy to gather those information for yourself. Just get wireshark or tcpdump and keep it running when uploading a trace. Then just identify the corresponding packet(s) and read their content. Alternatively read the code of one open source tool that is capable of GPS trace uploading.

(15 Dec '12, 09:17) scai ♦

Hi Scai,

It's k Scai. But it would be great if someone can give the set of headers, because it would be useful for developers who are using OSM API and track the concept Basic Authentication.

Thanks !!!

(15 Dec '12, 11:53) buddhima

One Answer:

0

You just follow instructions for API uploading traces. The basic auth (which is deprecated and you should use OAuth instead) is trivially encoded into URL, for example using POST to "http://username:password@api.openstreetmap.org/"

answered 23 Jul '13, 19:31

Matija%20Nalis's gravatar image

Matija Nalis
7502916
accept rate: 11%

Source code available on GitHub .