smiley/steamapi

Cannot get friends list

helsyQ opened this issue · 2 comments

Using this code, i can get user name, user level, but can't get user's friends list, getting error steamapi.errors.APIUnauthorized: This API is not accessible to you.

import steamapi
from steamapi import core, user

steamapi.core.APIConnection(api_key="<api key>", validate_key=True)

print(steamapi.user.SteamUser(<steamid>)

steam_user = user.SteamUser(userid=<steamid>)

print(steam_user.level)
print(steam_user.friends)

Actually, found a way to fix it by setting profile status to open. But how can i get list of ongoing invites to friends ?

You can't get any info that isn't public, like friend requests/invites. Only profile data and some game stats. (E.g.: achievements)