Hot answers tagged

13 votes
Accepted

How to make a Stack Exchange API call, using my key

It's pretty simple, you just append your key to the URL as a parameter. For example, looking for users 1 and 5: http://api.stackexchange.com/2.2/users/1;5?site=stackoverflow&key=YOUR_KEY_HERE So,...
user avatar
  • 12.6k
11 votes
Accepted

Unable to get access token

Refer to the Stack Exchange API, Authentication docs. It looks like you are trying to authenticate using either a server you do not control, or a local server that is not on the public internet. ...
user avatar
  • 12.6k
9 votes
Accepted

List of Votes by Authenticated users

No. Currently the users type does not return any private_info and neither does the user_timeline type return any voting information. No other API method allows for detecting a user's vote history ...
user avatar
  • 12.6k
8 votes
Accepted

StackExchange API /sites/ does not return all the sites

You need to pass in a sufficiently large pagesize value, per the documentation: The pagesize parameter for this method is unbounded, in acknowledgement that for many applications repeatedly ...
user avatar
  • 4,666
5 votes
Accepted

Is it possible to access data in real-time using the Stack Exchange API?

You can get data close-enough to "real time" for most practical purposes. See the StackHose app, for example. Read the page about the API's Throttles and Quotas. From that page we can deduce: The ...
user avatar
  • 12.6k
4 votes

StackPrinter: The Stack Exchange Printer Suite

status-completedI asked this as a question, but apparently the convention is to report bugs/feature requests in the announcement thread. It appears, that the MathJax extension mhchem is currently not ...
user avatar
4 votes
Accepted

Get the Authenticated User's email?

The API does not provide any method to determine a user's email address and it is unlikely to do so in the future. This would be a risk to both the user's privacy and his/her trust in Stack Exchange. ...
user avatar
  • 12.6k
3 votes
Accepted

What is the difference between accepted and is_accepted?

If the answer is the accepted answer, is_accepted is true and anyone can see it. accepted is set to true only if the currently authenticated user is the one who has accepted the answer. For instance,...
user avatar
  • 12.6k
3 votes
Accepted

How to get up_vote_count and down_vote_count for a user?

You need to use a filter that returns those properties. The default filter does not. Also, the API is at version 2.2. You should use that unless you've a very good reason not to. So try, for example:...
user avatar
  • 12.6k
3 votes
Accepted

Descriptions of tag-based badges are incorrect

This seems to have been silently/magically fixed in the last 7 months (Date of Nicos Karalis' comment). Descriptions seem correct now. I had verified that they weren't correct when I upvoted this ...
user avatar
  • 12.6k
3 votes
Accepted

How to set the width of an image in the body of a question?

Stack Exchange supports the width attribute; see "What HTML tags are allowed on Stack Exchange sites?". The answer to that question emphatically states: You must enter the tags exactly as shown. ...
user avatar
  • 12.6k
3 votes
Accepted

API documentation pages match some site names incorrectly

The console JS was doing fuzzy matching on ?site; but that's not really correct, as you demonstrated. With the latest deploy it does an exact match if possible.
user avatar
3 votes

Why is "body" missing from certain inbox items?

The documentation was updated sometime in the last 2 years and the API docs (version 2.2) now state that the property may be absent:
user avatar
  • 12.6k
3 votes

Are the "body", "comments" and "answers" parameters supported in the API version 2.x?

Are they moved to filters? Yes, you need to generate a filter that includes the question.body, question.comments, and question.answers fields. There are shorthand filters (i.e. _bca) that will do ...
user avatar
  • 4,666
3 votes

StackPrinter: The Stack Exchange Printer Suite

The default bookmarklet javascript has problems when used with mathoverflow. Because annoyingly mathoverflow ends with a .net instead of a .com. I made some changes so that it could also work with ...
user avatar
3 votes

StackPrinter: The Stack Exchange Printer Suite

Here is a small script (stackprinter) which uses Stack Printer from the command-line: #!/bin/sh type wkhtmltopdf || { echo >&2 "wkhtmltopdf command is required. Aborting."; exit 1; } :...
user avatar
  • 153
3 votes

How to deal with the "Too Many Requests" error coming as HTML?

It sounds like you've either got a bug which is in fact making more requests than you think it is, or you're on a network where there's some other source of high-frequency requests. You're not ...
user avatar
  • 4,666
2 votes

Stack.PHP - Powerful and Extensive Library for Accessing the Stack Exchange API - Including Full Support for v2.0.

bug support @Nathan Osman, I have been trying to get authentication working with your library (which is very useful BTW). However, whenever I use the explicit flow I end up with an error on the stack ...
user avatar
2 votes

StinkingBadges - Track your progress towards long-term badges

On Code Review we have people getting the Generalist Badge, but the app says we only have 38 tags that qualify, could you do some updating of that for us please?
user avatar
  • 251
2 votes

Get favorited tags of user

UPDATE: The feature appears to be present in the, so far, undocumented API version 2.3. See captncraig's answer on this page. After all these years, it looks like this might never get implemented. ...
user avatar
  • 12.6k
2 votes

Application Key and AccessToken are not working for Stack Exchange API?

In my particular case, I somehow managed to append % character to the end of the access_token. There should be no % character at the end of the access_token.
user avatar
  • 163
2 votes

StackExchange API Java SDK

stackoverflow-java-sdk artifacts have been upload to Maven Central. Now, You simply add maven dependency in your project POM Dependency <dependency> <groupId>com.googlecode....
user avatar
  • 305
2 votes

What is "accept_rate" in the Stack Exchange API?

accept_rate is the internally tracked value of the user's Accept Rate. This is roughly a measure of how many of the user's questions have answers and where one of the answers was accepted by the user....
user avatar
  • 12.6k
2 votes

"access_denied" error in the write answer at stackoverflow

You have to create a post describing your application, and edit it into your application's registration. Basically, the first arrow needs a value; and you can set it when you edit (with the second ...
user avatar
2 votes

How to track the open/closed status over the history of a question?

You can get at this information, but it's messy. Using the /posts/{id}/revisions route you can query for the list of all revision events for a particular question, which includes close/reopen events. ...
user avatar
  • 4,666
2 votes

Getting display name of the site on which question is located

You already know the site, it has to be built in to every /questions query. But, if you are querying separate sites with concurrent AJAX queries, merely encapsulate the site name in your AJAX ...
user avatar
  • 12.6k
2 votes

I Cannot Perform Oauth

The authentication process is described in the API docs: http://api.stackexchange.com/docs/authentication.
user avatar
  • 313
2 votes
Accepted

Add the 'people reached' count to the API?

Until the feature request is approved (unlikely, and a similar request has no developer love either), you can get this number in one of 3 ways: You can get slightly stale data with this SEDE query (...
user avatar
  • 12.6k
1 vote

API returns the last activity date even if asked not to

Confirmed. The path seems to use a default sort key on last_activity_date and that corrupts the filter somehow. (I checked for caching by waiting more than 1 minute and by varying the question ids.) ...
user avatar
  • 12.6k
1 vote

Get favorited tags of user

Good news! The (yet undocumented) api version 2.3 has this feature. https://api.stackexchange.com/2.3/users/{id}/tag-preferences?access_token=...&key=...&site=StackOverflow.com will give you ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible