DiscordAPIError[0]: 401: Unauthorized even though im authorized and the access token is brand new?
I want to get user's @me info with access token, but it says im unauthorized?
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v10');
const rest = new REST({ version: '10', authPrefix:'Bearer' }).setToken(req.cookies.__access_token__);
const info = await rest.get(Routes.user())npm list discord.js and node node -v version?

npm i @discordjs/rest
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, res.status, method, url, requestData);
^
DiscordAPIError[0]: 401: Unauthorized
at SequentialHandler.runRequest (C:\Users\julus\OneDrive\Desktop\levelio\node_modules\@discordjs\rest\dist\index.js:708:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.queueRequest (C:\Users\julus\OneDrive\Desktop\levelio\node_modules\@discordjs\rest\dist\index.js:511:14)
at async C:\Users\julus\OneDrive\Desktop\levelio\index.js:58:18 {
rawError: { message: '401: Unauthorized', code: 0 },
code: 0,
status: 401,
method: 'get',
url: 'https://discord.com/api/v10/users/@me',
requestBody: { files: undefined, json: undefined }
}
Node.js v21.6.0npm i @discordjs/rest