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,382
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,692
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
8 votes

Hide the Stack Exchange sidebar

Okay, the following Stylish style should be a good start. You can also see / install it at userstyles.org. @namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("askubuntu.com"),...
Brock Adams's user avatar
  • 12.9k
8 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,692
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,382
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,706
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,692
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

OAuth procedure for standalone user?

Refer to the API Authentication doc page, where it says: explicit grant (is) for server side applications Also, see What is the difference between the 2 workflows? and related questions. ...
Brock Adams's user avatar
  • 12.9k
5 votes
Accepted

Can I get information about a user with their network ID?

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

Getting "application not configured for implicit grants" error trying to setup website

Yes, it can be annoying that the API docs, the javascript SDK, and the settings pages use the terms: "Explicit" "Implicit" "Server side" "Client side" a little interchangeably. (The first 2 are ...
Brock Adams's user avatar
  • 12.9k
5 votes
Accepted

When asking/answering a question on SE sites; Is there a way to fix the page in place so that you only see the displayed output as you type?

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. (...
Brock Adams's user avatar
  • 12.9k
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,382
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

Why is my API quota not resetting after UTC reset?

Update: Evidence now suggests that the API quota rolls over at a unique time for each app. 24 hours after that app-key, plus IP, combination made its first API call. See this chat message. The ...
Brock Adams's user avatar
  • 12.9k
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,382
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

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