Skip to content

Commit

Permalink
Merge pull request #3 from xdevplatform/oauth2scopesall
Browse files Browse the repository at this point in the history
add all possible X API oauth2 scopes
  • Loading branch information
tapans authored Dec 17, 2024
2 parents 8bffcf5 + 64dae6f commit a57bcba
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit a57bcba

Please sign in to comment.