From 64dae6fa242b1a2f9972eb0772675d677189a142 Mon Sep 17 00:00:00 2001 From: Tapan Shah Date: Tue, 17 Dec 2024 17:42:42 -0500 Subject: [PATCH] add all possible X API oauth2 scopes --- src/auth/mod.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/auth/mod.rs b/src/auth/mod.rs index 26f10e5..505854c 100644 --- a/src/auth/mod.rs +++ b/src/auth/mod.rs @@ -156,9 +156,29 @@ impl Auth { let (auth_url, _csrf_token) = self .client .authorize_url(CsrfToken::new_random) + .add_scope(Scope::new("block.read".to_string())) + .add_scope(Scope::new("bookmark.read".to_string())) + .add_scope(Scope::new("dm.read".to_string())) + .add_scope(Scope::new("follows.read".to_string())) + .add_scope(Scope::new("like.read".to_string())) + .add_scope(Scope::new("list.read".to_string())) + .add_scope(Scope::new("mute.read".to_string())) + .add_scope(Scope::new("space.read".to_string())) .add_scope(Scope::new("tweet.read".to_string())) + .add_scope(Scope::new("timeline.read".to_string())) .add_scope(Scope::new("users.read".to_string())) + .add_scope(Scope::new("block.write".to_string())) + .add_scope(Scope::new("bookmark.write".to_string())) + .add_scope(Scope::new("dm.write".to_string())) + .add_scope(Scope::new("follows.write".to_string())) + .add_scope(Scope::new("like.write".to_string())) + .add_scope(Scope::new("list.write".to_string())) + .add_scope(Scope::new("mute.write".to_string())) + .add_scope(Scope::new("tweet.write".to_string())) + .add_scope(Scope::new("tweet.moderate.write".to_string())) + .add_scope(Scope::new("timeline.write".to_string())) .add_scope(Scope::new("offline.access".to_string())) + .add_scope(Scope::new("media.write".to_string())) .set_pkce_challenge(code_challenge) .url();