Hot answers tagged

12 votes

API "Hello World" code

Python: Below is python code to get minimal info results. See bottom on how to run. import requests BASEURL = "https://api.stackexchange.com/2.2/info" params = { "site" : "...
12 votes

I only need a key, what do I do?

When you click the Register link you're presented with this webform: If you're in a hurry and click Register your Application you'll find this error: The fields Name, Description, Website URL and ...
rene's user avatar
  • 2,482
11 votes

What exactly is a valid OAuth domain name for registering your app?

The OAuth Domain is either: A valid domain that you own and control, and that is hosted somewhere the client can reach. Say, for example that you owned unicorns.mil. See this answer and this answer ...
Brock Adams's user avatar
  • 12.9k
10 votes
Accepted

Why has my daily quota increased from 10k to 2 billion?

After re-investigating my code, I realized what was going on here. For this particular project I wasn't using the API key and access token of my own application; I'm using the ones I sniffed from the ...
Glorfindel's user avatar
  • 6,762
9 votes
Accepted

Can the redirect_uri contain port number?

You got that error because you set the OAuth Domain like example.com:8080, not the redirect_uri. That's not how you configure non-standard ports; see below. The redirect uri, with port, feature now ...
Brock Adams's user avatar
  • 12.9k
9 votes
Accepted

How do I get my total reputation score using the API?

Just use the plain /users/{ids} route. (For network-wide score, see the bottom section, below.) if you run it on your userid, it currently returns: { "items": [ { ... "reputation": 354, ...
Brock Adams's user avatar
  • 12.9k
9 votes
Accepted

How can I quickly get an access token for personal use?

It's possible to authenticate yourself via the command line; there's no need to set up a website or so. Open the application page via https://stackapps.com/apps/oauth and make sure the option 'Enable ...
Glorfindel's user avatar
  • 6,762
7 votes
Accepted

How to create API filters?

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 ...
rene's user avatar
  • 2,482
7 votes
Accepted

Can I have a separate account just for testing my Stack App?

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 ...
Tim Stone's user avatar
  • 4,686
7 votes
Accepted

How to get total visited days and consecutives of an user?

You cannot get the days visited, nor consecutive, information for a user because that is private information(Poster is SE representative). Stack Exchange is supposed to be about the content, not the ...
Brock Adams's user avatar
  • 12.9k
6 votes

Is the Stack API daily quota of 10,000 a hard limit, or can it be increased?

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 ...
Brock Adams's user avatar
  • 12.9k
6 votes
Accepted

As a user, where in the web UI could I find all the tokens I have granted for Stack Apps?

Go to your profile: https://stackapps.com/users/current Click the "Edit Profile & Settings" tab: https://stackapps.com/users/edit/current Click "Applications" on the left sidebar (no handy ...
Shog9's user avatar
  • 641
6 votes
Accepted

Does a closed and/or deleted Stack Apps post still provide access to the API?

I've just done a couple of tests with my placeholder app. Even though the question is closed, I was able to generate a new access token (following the regular procedure) for my sockpuppet account, and ...
Glorfindel's user avatar
  • 6,762
6 votes

Stack Overflow for Teams support

Unfortunately, the Free Tier Stack Overflow Team does not have access to APIs. You will not be able to create a PAT if you only have a Free Tier Team assigned to your account.
Deanna Irizarry-Fields's user avatar
5 votes
Accepted

How do I find all questions/answers per a tag using .Net?

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 ...
rene's user avatar
  • 2,482
5 votes
Accepted

How to increase app request quota from 300 to 10,000?

You are using the "Javascript SDK" and that's not how it works. The doc page calls the SDK "small and minimalistic".   The source code states: This file is provided to API clients to ...
Brock Adams's user avatar
  • 12.9k
5 votes
Accepted

Is the StackExchange API free of charge?

It is completely and unconditionally free. (Although there are usage limits, which are described here.) It is not even necessary to create an account in order to use it. (Although an account is ...
Cody Gray - on strike's user avatar
4 votes

How to list your application/library/wrapper/script here

I have written a chat bot. Do I need to announce its existence on Stack Apps? No, it is not mandatory to announce your chat bot with a post on Stack Apps. It is appreciated if you do, specially if ...
4 votes

How can I extract user information on Stack Overflow using Python and the Stack Overflow API?

The API presents individual features behind individual URLs. The information on the profile page is combined from several sources; to get the details you requested, you will have to submit multiple ...
tripleee's user avatar
  • 163
4 votes
Accepted

Refresh expired acess token basics

Dealing with token expiration is pretty simple. When a token is/goes bad then, when you make an API call that uses the token, you will get a JSON response like this: { "error_id": 403, "...
Brock Adams's user avatar
  • 12.9k
4 votes
Accepted

“Try It” URL has wrong URI

The link is correct. The purpose of that control is to provide a URL to the doc page with all the parameters prefilled. This is what most users expect and is similar to how that link control works ...
Brock Adams's user avatar
  • 12.9k
4 votes
Accepted

Would it be possible to create a script that could be run manually to unprotect questions that meet certain parameters?

Yes, it is possible to create such a script and here it is: // ==UserScript== // @name Unprotect questions // @namespace https://meta.stackexchange.com/users/158100/rene // @version 0....
rene's user avatar
  • 2,482
4 votes
Accepted

Script to dynamically expand the Q/A text field

Yeah, that's annoying and a problem with text areas throughout the interwebz. So, I went ahead and banged out a script for this; Merry Christmas! To install, click here (SE WMD scrollbar killer, ...
Brock Adams's user avatar
  • 12.9k
4 votes
Accepted

Is there an easy way to get user reputation via API?

The question is not clear. If you just want a user's reputation merely do a GET of the API /users/{ids} route. Like so:   api.stackexchange.com/2.2/users/3528590?site=stackoverflow&filter=!...
Brock Adams's user avatar
  • 12.9k
4 votes
Accepted

How to set a userscript, listed here on Stack Apps, to auto-update by itself?

It's debatable whether this question is on topic here, but here is an approach that works in most cases (User has a quality script manager, like Tampermonkey‡, and default settings): Host ...
Brock Adams's user avatar
  • 12.9k
4 votes

503 errors on batch get questions endpoint

So, you are making up to 150 requests in a 30 second period (10 "parallel requests", with a 2 second pause in between). And failing at 80 to 100+ seconds of operation and 400 to 500 total ...
4 votes

Creating personal applications using Stack Overflow/Stack Exchange API

If you need something for personal use, it doesn't really matter. You can even use example.com, as long as the site doesn't redirect and change the URL. You'll need a browser and a tool like curl. ...
Glorfindel's user avatar
  • 6,762
4 votes

How to 'publish' an app after the development is complete?

You should update your placeholder post to reflect the latest developments. You can use the template to know which information could be useful for potential users of your application. Otherwise, your ...
Glorfindel's user avatar
  • 6,762
4 votes

What write in app access for sending data

From the documentation: Apps must have a registered Stack Apps post to write. The next sentence (about links pointing back) is no longer true, but the one after that is right and important too: You ...
Glorfindel's user avatar
  • 6,762
4 votes
Accepted

stack remote download

The application is no longer under active development and is abandoned. For more details, see How can I report bugs with or request features for the Stack Exchange mobile apps? on Meta Stack Exchange.
Glorfindel's user avatar
  • 6,762

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