Tag Info

Hot answers tagged

5

I don't believe that that route accepts POST requests (as it's non-actionable), so you should have better luck sending a GET request instead. Routes that require auth tokens necessitate HTTPS, but still expect GET for read requests, and POST for writes.


5

Yes, that bug is annoying, especially since specifying a todate that's before the fromdate returns a valid result set, EG: { "items": [], "has_more": false, "quota_max": 10000, "quota_remaining": 9995 } -- rather than an error. Having the dates be equal is theoretically possible. Having negative time is impossible (in this context). However, ...


5

The unofficial Winterbash inbox API If you have any user's account_id then the hats information is just one call away. And the call is http://winterbash2014.stackexchange.com/api/inbox?accountId=<account_id> For example, hats information about me can be retrieved via http://winterbash2014.stackexchange.com/api/inbox?accountId=4996787 But here ...


4

The API documentation states that the API always returns a compressed response: ...we guarantee that all responses are compressed, either with GZIP or DEFLATE. GZIP is the default. This means that you must send the results from wget to gunzip. Like so: wget -O- <URL> | gunzip > results.json Or, in your specific example: wget -O- ...


4

Just set pagesize in the URL, like: https://api.stackexchange.com/2.2/tags?pagesize=10&order=desc&sort=popular&site=stackoverflow


4

items is documented in the Common Wrapper Object. It is an array of whichever object the given route returns. In the case of /me/associated,  items is an array of network_user objects. If you use a filter that returns .wrapper.type, then type will return the type that items has assumed. EG: { "items": [ // <=== Linked ...


4

See the documentation for network_user.   top_answers and top_questions are not returned by default; you must specify them explicitly in a filter. When you ran /me/associated from the doc page and from your app, you used a filter (!-*f(6r3ZbZjn) that specified those two properties. When you used the address bar of the browser, you didn't specify a ...


4

Nope. Neither the user_timeline object, nor the user object return any flagging information, at all. (as of API version 2.2). The question, answer, and comment objects can return a can_flag boolean, but this does not necessarily indicate that the user has already flagged, and it returns false for a variety of reasons. Flagging history is especially ...


3

If you query the site list, the markdown_extensions property for each site will contain the list of enabled post-processing extensions, if applicable. Some possible extensions are: Balsamiq MathJax Prettify I believe jTab is also used on the Music site, and there's a Chess extension on the Chess site, but these additions aren't listed in the ...


3

The \r\n issue was solved when I changed to a POST request. But, since I was retagging questions (didn't really need to change the body, just resend it), I ended up using the body_markdown, encoded with HTMLParser.HTMLParser().unescape() body_markdown = str(HTMLParser.HTMLParser().unescape(question_data['items'][0]['body_markdown'])) And then sending ...


3

"A number of" might be a bit of a misnomer, as there are a whopping four standard ones: From the filters documentation: default, each type documents which fields are returned under the default filter (for example, answers). withbody, which is default plus the *.body fields none, which is empty total, which includes just .total The page also ...


3

They are one and the same. When the API was first announced (March 31st, 2010), it was temporarily called the "Stack Overflow API" -- even though Jeff said that the API would be "for all the trilogy sites". Two month's later, when stackapps.com and the public beta were announced, the official name was already Stack Exchange API. There is no separate API ...


3

You cannot use a standard GET request. You must obtain the access_token and then POST the necessary parameters. The steps are currently: Setup: Register your app. Link it with a post here on Stack Apps that has a legitimate [app] or [script] tag. In most cases you will also tag it with placeholder. In your app: Have the user authorize your app and ...


3

http://winterbash2014.stackexchange.com/api/user-hats?userId=29538&host=stackapps.com This returns an array of arrays. Each inner array contains three integers: The Id of the hat The number of times the user has earned this hat, all over the network 1 if the user has earned this hat on this particular site (Stack Apps, in this example); 0 otherwise.


3

You cannot do this. A delete feature has been requested and requested again (with status-planned given about 3.5 years ago). Register your desire for this by immediately upvoting these posts: Deleting an application key? How to delete an OAuth (2.0) API key? (Theoretically, if those feature requests get enough upvotes, they might get some developer ...


2

If you just want the total, don't bother paging through the entire full result set. Use the total property of the Common Wrapper Object. This will save lots of time and bandwidth and quota and doesn't require you to loop through the results just to count things. The total property is not enabled by default, so you will need to Create a custom filter for ...


2

It does return all the answers, but they're paged - by default you'll only get 30 at a time. You'll likely want to increase pagesize to 100, and then add the additional code necessary to make subsequent requests if has_more is set on the response wrapper. So, for example, your first request would be like ...


2

See What can I do when getting “We are no longer accepting questions/answers from this account”?. You didn't provide which site you ran the /docs/create-question post on. But, looking at your network profile, I can see that you might well be question-banned on Stack Overflow (Lots of questions with few upvotes and none of them marked answered). It's ...


2

It would be simpler and more precise if you made users provide their ID number instead (for example, yours is 1637442 on Stack Overflow). Then you'd merely use the /users/{ids}/questions route to get the questions. If you really must have access by username, then: First do a search using the inname parameter of the /users route. It is recommended that ...


2

No, the API only allows you to connect to existing Stack Exchange sites, and Stack Exchange no longer sells private sites. Looks like you want one of the clones listed on Meta. Since it's not clear which, if any, of those clones offer an API, there is another approach... If you submit your site through the Area 51 proposal process and it goes to beta, ...


2

There doesn't seem to be a place that describes the policy. That API-object, documentation page would be perfect for it. However, a lead Stack Exchange developer has stated that anything that reveals voting patterns will be hidden or private. Another Stack Exchange employee explains how user deletions and post deletions are kept private-ish, but ...


2

Currently, the Stack Exchange API has nothing to do with Stack Overflow Careers. Anyway, there is no API for accessing Stack Overflow Careers job listings. Best you can do is grab the most recent 1000 listings from the Careers "all new jobs" RSS feed.


2

The StackWrap4J library is very obsolete. Its page states: The latest build was tested against version 1.0 of the API on July 28th. But API version 1 has been shut down for quite a while. The API is currently at version 2.2. Choose a different library. The list is at stackapps.com/questions/tagged/library+java. Choose one that supports API version ...


2

Your second call must be https:. You actually got an error like: "error_id":406, "error_message":"Access token sent over non-HTTPS request, it has been invalidated", "error_name":"access_token_compromised" On the first attempt. Only subsequent attempts, with the same token, would yield the 'key' is not valid for passed 'access_token' error. When ...


2

Until the feature request is approved, you can get this number in one of 3 ways: You can get slightly stale data with this SEDE query. Note that it uses your Stack Exchange account number (4337810 for the OP) -- which you can get by clicking on the "Accounts" listing of any profile page. Or, You can make a boatload of API calls to get the current ...


2

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: http://api.stackexchange.com/2.2/users/55075?site=stackoverflow&filter=!G*ky*lRuarbDJTpnwEtY-a05oz Or: ...


2

Of course as soon as I finally break down and ask a question I see my mistake: Applications that have the client side flow enabled can use https://stackexchange.com/oauth/login_success as their redirect_uri by default. I had "Desktop OAuth Redirect Uri" disabled which the javascript SDK uses. (Note the url posted in the question) Leaving this up here in ...


2

I faced the same issue when I was using the stack exchange API to post a message to stack overflow website. I figured I had to post my application on a domain name. I hosted my application on free domain provided by 000webhost.com. You may wish to take a similar approach. After deploying the application on the domain, change the oauth domain and the ...


2

The authentication process is described in the API docs: http://api.stackexchange.com/docs/authentication.


2

In order to get 50 questions for every request you need to pass pagesize parameter to your request URL. When you pass this parameter, you will need to pass page parameter to fetch the following pages. In order to exclude some attributes from the default set, you can use the "Try It" part of the documentation to create a filter for your specific purpose. ...



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