Soenneker.X.OpenApiClient 11.0.286

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.X.OpenApiClient --version 11.0.286
                    
NuGet\Install-Package Soenneker.X.OpenApiClient -Version 11.0.286
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.X.OpenApiClient" Version="11.0.286" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.X.OpenApiClient" Version="11.0.286" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.X.OpenApiClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.X.OpenApiClient --version 11.0.286
                    
#r "nuget: Soenneker.X.OpenApiClient, 11.0.286"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.X.OpenApiClient@11.0.286
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.X.OpenApiClient&version=11.0.286
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.X.OpenApiClient&version=11.0.286
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.X.OpenApiClient

A Kiota-generated .NET client for the X API, including strongly typed request builders and response models.

Installation

dotnet add package Soenneker.X.OpenApiClient

Usage

The generated client requires a Kiota request adapter. This example uses an app bearer token to search for users:

using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.X.OpenApiClient;
using System.Net.Http.Headers;

using var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", bearerToken);

var adapter = new HttpClientRequestAdapter(
    new AnonymousAuthenticationProvider(),
    httpClient: httpClient);

var client = new XOpenApiClient(adapter);

var response = await client.Two.Users.Search.GetAsync(request =>
{
    request.QueryParameters.Query = "dotnet";
    request.QueryParameters.MaxResults = 25;
}, cancellationToken);

foreach (var user in response?.Data ?? [])
    Console.WriteLine($"{user.Name} (@{user.Username})");

X endpoints accept different authentication contexts. Use an app bearer token only for endpoints that support app-only authentication; user-context operations require the appropriate OAuth access token.

The generated surface follows the API path hierarchy. For example, /2/users/search is exposed as client.Two.Users.Search.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.X.OpenApiClient:

Package Downloads
Soenneker.X.ClientUtil

Provides a cached X OpenAPI client authenticated with a configured bearer token.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.311 78 11/11/2026
11.0.310 129 11/11/2026
11.0.309 132 11/10/2026
11.0.308 101 11/10/2026
11.0.307 113 11/8/2026
11.0.306 123 11/7/2026
11.0.305 121 11/6/2026
11.0.304 135 11/5/2026
11.0.303 134 11/4/2026
11.0.302 144 11/3/2026
11.0.301 115 11/3/2026
11.0.300 179 11/3/2026
11.0.299 121 11/2/2026
11.0.298 119 11/2/2026
11.0.297 119 11/2/2026
11.0.296 120 11/2/2026
11.0.295 100 11/1/2026
11.0.294 128 10/31/2026
11.0.293 120 10/31/2026
11.0.286 121 10/27/2026
Loading failed

Remove redundant framework conditions