3

I was able to run this request https://api.stackexchange.com/2.3/users/MY USER ID/timeline?sort=creation&page=1&pagesize=100&site=stackoverflow just fine.

For some reason, when I change this URL to end with "site=ethereum" instead of "site=stackoverflow", I get an empty array. I have lots of posts on https://ethereum.stackexchange.com/, so I know it's not working.

How do I run https://api.stackexchange.com/2.3/users/MY USER ID/timeline?sort=creation&page=1&pagesize=100&site=stackoverflow with "site" set to a Stack Exchange site instead of Stack Overflow?

0

1 Answer 1

6

To get information about a user across multiple sites you should get their user id for each site and update the API call accordingly. A user's id very likely differs across each Stack Exchange site they use as described here:

Your id is different on each site as it depends on when you joined the site and how many people had joined before you.

So if you are using the user id you have for Stack Overflow to get information about your user for Ethereum Stack Exchange that will most likely (unless you coincidentally end up having the same id) give you wrong results.

1
  • 4
    If you know a user's ID on one site, you can get the IDs of their associated profiles on other sites using the /users/{ids}/associated route.
    – NobodyNada
    Commented Jun 8, 2023 at 23:21

You must log in to answer this question.

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