Skip to main content
XClient supports Bearer Token (app-only), OAuth 2.0 with PKCE (user context), and OAuth 1.0a (user context) via XClientOptions. Get your credentials from the X Developer Console.

Bearer Token

OAuth 2.0 with PKCE

If you already have a user access token:
To run the PKCE authorization flow and refresh tokens with OAuth2Pkce:

OAuth 1.0a

OAuth 1.0a is disabled for newly created apps and is scheduled to be retired on January 31, 2027. Newly created apps must use OAuth 2.0 with PKCE or Bearer Token. Existing apps with OAuth 1.0a enabled can continue using it until January 31, 2027 — see Migrate from OAuth 1.0a to OAuth 2.0.
See the C# samples repo for more examples.