3

I've been trying to get the StackExchange API to work correctly over the last couple of days and while there seems to be progress, I'm still not getting the end result.

I'm testing it out using the https://api.stackexchange.com/docs/create-answer form and am trying to post a new answer to the "sandbox" question with ID of 51812. I enter in the ID, body, key and access_token (based on my App key and an access_token I got when authenticating) and when I run the API request (/2.2/questions/51812/answers/add) using the parameters, I get back what looks like a valid JSON response (vs. some error response) but yet I still do not see the actual answer/body associated with the Question 51812. The strange thing is the "answer_id" in the response JSON is 0, which doesn't seem right either.

Any explanation or suggestions as to why the API isn't working / answer isn't actually getting created?

Here is the JSON response I get:

{
  "items": [
    {
      "owner": {
        "reputation": 1,
        "user_id": 269870,
        "user_type": "registered",
        "profile_image": "https://www.gravatar.com/avatar/5597f8d6d5d75f3421516b9b0ff8c100?s=128&d=identicon&r=PG&f=1",
        "display_name": "Dave",
        "link": "http://meta.stackexchange.com/users/269870/dave"
      },
      "is_accepted": false,
      "score": 0,
      "last_activity_date": 1409802888,
      "creation_date": 1409802888,
      **"answer_id": 0,**
      "question_id": 51812
    }
  ],
  "has_more": false,
  "quota_max": 10000,
  "quota_remaining": 9998
}

You must log in to answer this question.

Browse other questions tagged .