Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc scope not found #166

Closed
PixelPage-YT opened this issue Feb 20, 2022 · 1 comment
Closed

rpc scope not found #166

PixelPage-YT opened this issue Feb 20, 2022 · 1 comment

Comments

@PixelPage-YT
Copy link

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
Copy link
Member

devsnek commented Feb 20, 2022

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.

@devsnek devsnek closed this as completed Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants