Issue with guild.AddMemberAsync #1713
Replies: 1 comment
-
|
Nevermind I figured out my issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am having issues with adding a member to a guild.
I have started this whole process by using oauth and when authorizing the user i am requesting scopes of identify, email, and guilds.join. Once the user it validated then I have the access and the refresh tokens.
I then have a bot that uses DSharp.
I am able to get the guild correctly calling this method
var guild = await _discordClient.GetGuildAsync(_configuration.GetValue<ulong>("Discord:ServerId"));To add the user I am then calling this method and passing in the users access token from the oauth call.
await guild.AddMemberAsync(discordUser, user.DiscordAccessToken);Everytime I do this i get a 403 Response : Invalid OAuth2 access token.
Can someone help me out and let me know what I am doing wrong.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions