So what I'm trying to do is I'm creating some kind of dashboard for my bot and I want to get the current guilds roles. When I try to do that, I get {'message': '401: Unauthorized', 'code': 0}
as response. I tried everything and looked at multiple questions as well as issues on github
json.loads(discord_oauth.discord.get(f"/api/guilds/{server}/roles", headers={"Authorization": "client-secret-here"}).content)
If you ask why I didnt put Bearer
in front of my client secret thats because the library I'm using already puts that in front. So the header will return like this: {"Authorization": "Bearer client-secret-here"
(I tried putting that too but it didn't work either)
I tried doing it with requests.get() too but it didnt work either. I always got {'message': '401: Unauthorized', 'code': 0}
as response. How can I fix this?
(This code doesn't work only when I'm trying to get guild channels and guild roles. It works with guild and user info)
My scopes are: ["guilds", "identify"]