discordjs / RPC

A simple RPC client for Discord
MIT License
459 stars 190 forks source link

rpc scope not found #166

Closed PixelPage-YT closed 2 years ago

PixelPage-YT commented 2 years ago

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

devsnek commented 2 years ago

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.