Skip to content

Instantly share code, notes, and snippets.

@xtekky
Created June 19, 2022 22:07
Show Gist options
  • Save xtekky/f1a5b49df0d710e1cde76106a69c6df7 to your computer and use it in GitHub Desktop.
Save xtekky/f1a5b49df0d710e1cde76106a69c6df7 to your computer and use it in GitHub Desktop.
Get Discord User info
import requests, json
token = 'DISCORD_USER_TOKEN'
ids = 'TARGET_ID'
response = requests.get(
url = f'https://discord.com/api/v9/users/{ids}',
headers = {
'authorization': token,
}
)
print(json.dumps(response.json(), indent=4))
@4ntoniomunoz
Copy link

Could you explain how it works? how to do it ? What I need?

sorry i'm a newbie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment