2

I'm implementing the OAuth system through StackExchange API, here is the guide.

I've already integrated the OAuth system with stack overflow with the following parameters:

And it works just fine!

My question is: how do I integrate other sites? Where can I find the auth url to pass in the OAuth flow? For example to OAuth to mathematics, this OAuth URL: https://mathematics.com/oauth/access_token/json doesn't work!

What should I use to perform the OAuth flow to other sites like Super User, Stack Apps, Stack Exchange, Mathematics etc...? Where can I find the correct URL?

1 Answer 1

1

You already have the correct URL. The access token is valid for all sites, even those for which you don't have an account. The documentation explains how to switch to a different site than Stack Overflow:

Per-Site Methods

Each of these methods operates on a single site at a time, identified by the site parameter. This parameter can be the full domain name (ie. "stackoverflow.com"), or a short form identified by api_site_parameter on the site object.

2
  • Oh I didn't know that! May I ask: I fetched /me/associated to retrieve the list of channels I'm associated with. And it returns a list. If I perform some actions lets say with StackExchange it works! But If I do it with Super User I receive: "The account associated with the access_token doesn't have a user on the site" even if it is returned from me/associated Jul 22 at 10:51
  • What I meant was: you can use the same token to e.g. fetch questions from sites you don't have an account on. me/associated doesn't accept a site parameter, because it's a Network Method; These methods return data across the entire Stack Exchange network of sites. Accordingly, you do not pass a site parameter to them.
    – Glorfindel
    Jul 22 at 19:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .