S

Stack Exchange API

REST discovered

Details
URL
https://api.stackexchange.com/2.0
Docs
https://api.stackexchange.com/docs
Authentication
Stack Apps API key api_key discovered Get key ↗
Authorization: Bearer <credential>

Register an application on Stack Apps or go to Your Apps. Open your application and click Generate API Key. Stack Exchange notes the key is shown only once, so store it securely. API keys are used for read-only public access and are also required alongside OAuth access tokens for API requests.

Stack Apps API key Authorization: Bearer <credential> + Stack Apps OAuth app credentials Authorization: Bearer <credential> discovered
Stack Apps OAuth app credentials oauth2 Set up OAuth ↗

Register an application on Stack Apps or open Your Apps. Use Manage OAuth to enable the grant types you need and configure your OAuth domain or non-web redirect URL. Use the issued client_id for OAuth flows; if you are a confidential client, click Generate client secret and store the client_secret securely because Stack Apps will not display it again. You will also need an API key from the same app for authenticated API calls.