Hot answers tagged

5

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. Crucial Points: Do not specify a redirect_uri to any server that you do not control!!! When you use something like redirect_uri=https://www.yahoo.com/, then a ...


5

No, the WebSockets are not officially supported. They are internal to Stack Exchange, use them at your own risk. If it is at all possible to do your task with the API, use that. That's what it's there for. Some people have sussed out some of the endpoints. You can see them in the answers to: How do the Stack Exchange WebSockets work? What are all the ...


5

You can use /users/{ids}/associated Try it for your network account Returns all of a user's associated accounts, given their account_ids in {ids}. {ids} can contain up to 100 semicolon delimited ids, to find ids programatically look for account_id on user objects. You can filter the network_users returned by this method with the types ...


5

This doesn't have anything to do with Stack Exchange pages, it's a browser thing and mostly a very good thing. You can see that the page isn't doing it by: Disable all javascript on your browser. (Re)load an appropriate Stack Exchange page (or any long page with a <textarea>). Focus the textarea for keyboard input but use the mouse to scroll it out ...


4

The various /questions routes do allow you to simultaneously retrieve answers, if you set the right filter. A good starting filter for getting questions with answers is: !gB7hjL3lhJ*Cnfe63rh6pAm74J(5qrOZKbL To Customize a Filter: Go to the /questions documentation page. Scroll to the Filter Edit Tool: Click on the tool and this dropdown appears: ...


4

It's allowed with the caveat there's no guarantee it won't be merged, provided that you abide by the good faith criteria. If you attempt to actually run something like the script in your previous post, for example, both accounts will likely be suspended without second thought. Having a separate account for testing doesn't shield you from the consequences of ...


4

Your stated problem is considerably easier than the question you linked. You can use the /users/{ids}/answers route to get what you want -- with a little work. The trick is to use a filter that returns the answers.tags property. In your case, if you really just want totals, and for one user at a time, you can use the filter: !GeF-5u(cSumXA . The ...


3

You can create and edit filters from the documentation page of the API endpoint. So you start at the Index of all endpoints. There you'll find /users/{id}/answers. On the right at the top of the parameter block you'll find the filter dialog: When you click the [edit] link the filter dialog opens: Where you can expand any the [types] provided by this ...


3

See How API Keys Work. It's six years old, but a leading API developer said: ... If you can demonstrate a need for a higher request quota, contact us. However, the Key limit should be sufficient for development, so please only request an increased quota when your application is live and has a non-trivial number of users. (Emphasis and contact ...


3

An inbox message body is not the same as a post body. Inbox messages are truncated by design. Here's a snippet of my inbox: Notice how the "body" is truncated at 100 characters? (Counting the ... and accounting for HTML entities like &#39;.) The results I get from /2.2/me/inbox?filter=!SmOhH2b13NujlyyXX6 are exactly the same: "body": "Very ...


3

There really is no particularly satisfactory way to do this since all versions of last_activity_date conflate a question's activity with the activity of its answers. You are going to have to fetch lots of items and filter out the chaff yourself. There are 2 main routes you can take, events or questions: A) Use the /events route: Use a filter that ...


3

Notice that the route used has /top-answerers/. The doc page states: Returns the top 30 answer​ers active in a single tag, of either all-time or the last 30 days. (Emphasis added) So, that route is returning what it should. If you really want the top answers for a tag, use the /search/excerpts route and set: sort=votes order=desc q=is:...


3

It's a bit confusing but that is not a bug. Think of it as, "Reputation change from when to when?" Since you specified neither a fromdate, nor a todate, you are effectively asking for the changes for all time. If you run the query for Nov 1, 2015 to Nov 9, 2015:           /2.2/users/21539/reputation?fromdate=1446336000&todate=...


3

Yes, I always get 86399 too. And, no, you can't specify an interval other than no_expiry. But you can call /access-tokens/{accessTokens}/invalidateDoc at whatever interval you wish. So, for less user annoyance, set no_expiry but then call /invalidate every, say, 8 days, for example.


2

You are probably having this error because of throttles (most likely per-method throttles) that are used to prevent abusive usage. Have a look at related documentation page in order to learn more about throttles. Normally you should wait for a specified period which is returned in the backoff field of the previous response.


2

Quoting from a comment of @BrockAdams to one of my answers, the preview parameter is used for development and testing purposes. If you set it to true, your request will only simulate whether it is a valid request or not and will not change anything on the site.


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. ...


2

If you're trying some features right in the docs and this features require access token, it's requesting access to your token; if you approve, it appears as application. E.g., if you click "Get Token" button on the https://api.stackexchange.com/docs/notifications, you'll get: As for being listed it on Stack Apps: it isn't, as it's an app from SE.


2

You can use the /search method with tagged and intitle For example: http://api.stackexchange.com/2.2/search?order=desc&sort=activity&tagged=rest&intitle=api&site=stackoverflow will search for questions on Stack Overflow with api in the title and that are tagged with rest. The first two items I get when running this are: { "items": [ {...


2

There is no difference and... The inbox has always been "The global inbox". Certainly for as long as the API has existed. So any inbox route will be Stack Exchange wide, even if it accepts a site parameter. If you look at the doc for the /users/{id}/inbox/unread route, it says: This method is effectively an alias for /inbox/unread. It is provided for ...


2

Yes, if you omit those parameters it will give you the expected result... If a valid token is passed, then it will return the user ("There can be only one.") who obtained/approved that token. For this route, the fromdate and todate parameters filter on the creation_date property of the user object. So, if the authorized user signed up for his/her account ...


2

RE: Is site the api_site_parameter of the site object? Yes.   Although as stated in the "Per-Site Methods" section of the main doc page, you can also use the full domain name, EG cooking.stackexchange.com. No, user and shallow_user are site specific objects. You absolutely need to specify site to get these. Supposedly, the assumption is that all /...


2

First, page and page_size are NOT returned by default. You have to specify a custom filter to get those. If you don't want those properties, don't use a filter that requests them! :) Second, there is a very good reason to have those properties in real-life scenarios: Remember that API operations are asynchronous. This means that your app can't be sure of ...


2

This is exactly how it should be (except that the doc page might be more explicit). The meta_site parameter refers to Per-site Metas. Meta Stack Exchange is not a per-site meta. Think of it as a Stack Exchange main site about Stack Exchange itself -- encompassing Stack exchange operations and hundreds of SE-operated sites. See "The future of meta....


2

The API does not provide a good way for this. Worst case, your app will have to keep a table of every question in the tags of interest. Poll that table and see if the accept status has changed from the last stored answer id, if any. Beware that, depending on what tags you search, and how often you poll, your app may bust its quota. If you don't mind ...


2

First, you'll want to go upvote the feature request to add tag search for answers, etc. (If/when you have the upvote privilege) In the meantime, for answers by tag you can use the /search/excerpts route as long as you include is:answer in the q parameter. For example:       /2.2/search/excerpts?&q=is:answer&tagged=best-in-place&...


2

To get the questions in a tag you can simply use the /questions endpoint as that does accept a tagged query parameter, from that document page: To constrain questions returned to those with a set of tags, use the tagged parameter with a semi-colon delimited list of tags. This is an and contraint ... The API endpoints can relatively simple be used from ...


2

Alas, no. The API currently does not have any easy way to track a user's edits. You can see what returns edit information by scrolling to the bottom of the revision object, documentation page. Currently, it says: Methods That Return This Type     posts/{ids}/revisions     revisions/{ids} Such cross-references are on every ...


2

This isn't really a place to code-review your script, even if it uses the API. Here is were you would publish your script1. However, after a quick glance at the code, I don't see any glaring problems. But, if you start making lots, or rapid, calls you will need to check and respect the backoff value and the quota_remaining value. The API documentation is ...


2

Yes, each time you invoke stackexchange.com/oauth/ you will get a fresh access token, even though old ones may still be valid. For example: Go to /me/inboxLivedoc and hit Get Token twice, recording the token value each time (It will always be different). Then go to /access-tokens/{accessTokens}Livedoc and check each token. They will both still be valid! (...



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