[OSM-dev] oAuth PUT not working

Stephan Knauss osm at stephans-server.de
Sun Jan 15 17:39:28 GMT 2012


I had a working PHP script to edit tags. It uses the pecl oauth library.

Now it stopped working. I suppose it is broken since the last changes on 
the OSM servers end of November. The script is rarely used so I just 
noticed the problem.

My token is valid.

It is possible to issue a GET request to read the preferences.
But it fails with a result 401 when trying to issue a PUT request for 
creating a changeset.

Is there anything I need to update on my side to make it work again or 
is the server side broken? Wiki mentions I have to use version 1.0 which 
the script seams to do.

I replaced some data by XXX:

This is working:

This fails:
[headers_sent] =>
PUT /api/0.6/changeset/create HTTP/1.1
User-Agent: PECL-OAuth/1.2.2
Host: api.openstreetmap.org
Accept: */*
Authorization: OAuth 
Content-Length: 161
Content-Type: application/x-www-form-urlencoded

[headers_recv] =>
HTTP/1.1 401 Authorization Required
Date: Sun, 15 Jan 2012 17:22:15 GMT
Server: Apache/2.2.14 (Ubuntu)
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.11
WWW-Authenticate: Basic realm="Web Password"
X-UA-Compatible: IE=Edge,chrome=1
X-Runtime: 1.003074
Cache-Control: no-cache
Status: 401
Vary: Accept-Encoding
Content-Length: 25
Content-Type: text/html; charset=utf-8


More information about the dev mailing list