Hey, I'm playing around with OSM Oauth1.0a login for a simple application/tool. Is it possible to get responses as JSON instead of XML from the OSM API? I just saw that the OSM API for Notes does support JSON, so I was asking myself if there is a way for OAuth requests/responses as well. Would be a great benefit for js/node.js applications ;) Thanks in advance! asked 04 Sep '14, 15:56 kerosin |
Not at the moment, although it's a feature that has been planned for a while. For now, you need to parse the XML responses. answered 04 Sep '14, 17:12 Andy Allan |
You may be confusing things here: responses from the API, which as Andy points out are currently only available as XML (with the exception of the Notes API) and on the other hand authorisation of requests to the API with OAuth which has nothing to do with the format of the response. See http://tools.ietf.org/html/rfc5849 for OAuth, I believe MapBox has a JS implementation. answered 04 Sep '14, 20:50 SimonPoole ♦ Okay, I'm talking of responses of the API. Yeah you're right there is a Mapbox implementation: https://github.com/osmlab/osm-auth
(04 Sep '14, 21:03)
kerosin
|