Jun 20, 2021
0
Level 1
Discord API (give role to guild member) returns 405
Hello.
I'm trying to give role to authorized user after logging in to website with discord OAuth.
I used GuzzleHttp and this my code:
$response = Http::PUT('api/guilds/{guild id}/members/{user id}/roles/{role id}');
return $response->json();
(I replaced ids and api link just here it's ok in my code)
But it returns 405 Method not allowed. problem is in Discord API documents method is PUT
I even send header with "withToken" but it didn't worked
Please or to participate in this conversation.