NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

kerosin
411131627
accept rate: 0%


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.

permanent link

answered 04 Sep '14, 17:12

Andy%20Allan's gravatar image

Andy Allan
12.5k23128153
accept rate: 28%

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.

permanent link

answered 04 Sep '14, 20:50

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 04 Sep '14, 20:51

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×290
×84
×28
×22

question asked: 04 Sep '14, 15:56

question was seen: 3,836 times

last updated: 04 Sep '14, 21:03

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum