'401 when fetching Discord channel messages using RestCord
I'm using Restcord ( Restcord.com ) to connect to Discord. I'm using OAuth instead of Bot
use RestCord\DiscordClient;
$token = $_SESSION['access_token'];
$discord = new DiscordClient(['token' => '$token','tokenType' => 'OAuth']);
var_dump($discord->channel->getChannelMessages(['channel.id' => 924525404658749500]));
Yet I'm getting a 401 Unauthorised.. Its not private and the OAuth token creation was successful so I'm puzzled
Solution 1:[1]
looks like its available only for bots token not for oauth2.0
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | 101 |
