discordjs / RPC

A simple RPC client for Discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rpc scope not found

PixelPage-YT opened this issue · comments

Hello,
this is my code:

const clientId = '945005161615597609';
const scopes = ["rpc"];

const client = new RPC.Client({ transport: 'ipc' });

client.on('ready', () => {
  console.log('Logged in as', client.application.name);
  console.log('Authed for user', client.user.username);
});

// Log in to RPC with client id
client.login({ clientId: clientId, scopes: scopes });

The Auth Window appears correctly, but i get this error:

Error: OAuth2 Error: invalid_scope: The requested scope is invalid, unknown, or malformed.

I'm running electron Version 16.0.7

commented

You need permission from discord to use the rpc scope. Note that if you just want to set up rich presence, you don't need to request any scopes.