Xdk::Client supports all three X API authentication schemes and automatically chooses the appropriate header for each endpoint (preferring user context on write endpoints and Bearer Token on read endpoints when multiple credentials are supplied).
Guides
Authentication in Ruby XDK
Configure Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a authentication with the Ruby XDK.
⌘I