Soenneker.X.OpenApiClient 4.0.257

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 4.0.257
                    
NuGet\Install-Package Soenneker.X.OpenApiClient -Version 4.0.257
                    
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="4.0.257" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.X.OpenApiClient" Version="4.0.257" />
                    
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 4.0.257
                    
#r "nuget: Soenneker.X.OpenApiClient, 4.0.257"
                    
#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@4.0.257
                    
#: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=4.0.257
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.X.OpenApiClient&version=4.0.257
                    
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 net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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
4.0.259 0 10/11/2026
4.0.258 6 10/10/2026
4.0.257 60 10/9/2026
4.0.256 87 10/8/2026
4.0.255 100 10/7/2026
4.0.254 104 10/6/2026
4.0.253 109 10/5/2026
4.0.252 125 10/4/2026
4.0.251 116 10/3/2026
4.0.250 106 10/2/2026
4.0.249 96 10/1/2026
4.0.248 133 9/30/2026
4.0.247 120 9/29/2026
4.0.246 171 9/28/2026
4.0.245 118 9/27/2026
4.0.244 132 9/26/2026
4.0.243 139 9/25/2026
4.0.242 133 9/24/2026
4.0.241 99 9/24/2026
4.0.240 132 9/23/2026
Loading failed

Update Soenneker.X.OpenApiClient