OAuth authorization and PUT requests

Hello, I’m implementing a client for the OSM api.
The authorization is working fine with osm-oauth (https://github.com/osmlab/osm-auth) and I can make all the GET requests, but all PUT or DELETE requests fail with a ‘401 Unauthorized’ message, although the request headers are identical (or is this the problem?).

If anybody can give me a working example of a PUT request I would be very thankful.

I’d suggest either looking at the source code of JOSM, or running JOSM and capturing the traffic with wireshark. or similar.

Actually a lot of this is output by JOSM, anyway.

If you don’t get a reply with specific examples, other places you mgiht consider searching / asking are :

o the dev mailing list https://lists.openstreetmap.org/listinfo/dev

o the help site http://help.openstreetmap.org

o #osm-dev on IRC (see http://wiki.openstreetmap.org/wiki/IRC )

The fact that you can do a GET and not a PUT I suspect means that you’re not authorized (anyone can do a GET, regardless of logged-in status).

I’d also prepare yourself for lots of people asking about programmatic access to the API, since there’s a general nervousness about wide-ranging changes to OSM data (e.g. imports). I’m not implying that you’re doing anything “bad” here; just suggesting that you might need to explain that you’re not :slight_smile: