eBay.OAuth.Client 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package eBay.OAuth.Client --version 2.0.0
NuGet\Install-Package eBay.OAuth.Client -Version 2.0.0
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="eBay.OAuth.Client" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add eBay.OAuth.Client --version 2.0.0
#r "nuget: eBay.OAuth.Client, 2.0.0"
#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.
// Install eBay.OAuth.Client as a Cake Addin
#addin nuget:?package=eBay.OAuth.Client&version=2.0.0

// Install eBay.OAuth.Client as a Cake Tool
#tool nuget:?package=eBay.OAuth.Client&version=2.0.0

= eBay OAuth C# Client Library :toc: :toclevels: 4

== Summary To make integrations with eBay RESTful APIs easier, eBay provides client libraries in C# and Java to make it simpler to set up authorization, reduce the amount of code the application developers have to write to get OAuth Access Tokens. This library in addition to functioning as a simple eBay OAuth Client, helps with additional features such as cached App tokens.

== What is OAuth 2.0 https://tools.ietf.org/html/rfc6749[OAuth 2.0] is the industry-standard protocol for authorization to obtain limited access to an HTTP service. All https://developer.ebay.com/docs[eBay RESTful APIs] use the OAuth 2.0 protocol for authorization. OAuth access tokens verify to eBay that a request is coming from a valid client and that the application has the user's authorization to carry out the requests. Learn more about the https://developer.ebay.com/api-docs/static/oauth-tokens.html[OAuth Access Tokens].

== Supported Languages eBay OAuth Client is a class library that targets the .NET Standard 2.0. This library can be used by any .NET implementation that supports 2.0 version of the .NET Standard.

== Add the eBay.OAuth.Client NuGet Package Current Version : 2.0.0

Use of this source code is governed by https://opensource.org/licenses/Apache-2.0[Apache-2.0 license].If you're looking for the latest stable version (2.0.0), you can grab it directly from NuGet.org. [source,xml] https://www.nuget.org/packages/eBay.OAuth.Client

=== NuGet Package Manager UI

  • In Solution Explorer, right-click NuGet in .csproj and choose Add Package.
  • Search for eBay.OAuth.Client, select that package in the list, and click on Add Package
  • Accept the License prompt

=== Package Manager Console

  • Use the following command in your project directory, to install the eBay.OAuth.Client package: [source,xml] Install-Package eBay.OAuth.Client -Version 2.0.0

  • After the command completes, open the .csproj file to see the added reference: [source, xml] <ItemGroup> <PackageReference Include="eBay.OAuth.Client" Version="2.0.0" /> </ItemGroup>

=== .NET CLI

  • Use the following command in your project directory, to install the eBay.OAuth.Client package: [source,xml] dotnet add package eBay.OAuth.Client --version 2.0.0

  • After the command completes, open the .csproj file to see the added reference: [source,xml] <ItemGroup> <PackageReference Include="eBay.OAuth.Client" Version="2.0.0" /> </ItemGroup>

=== Paket CLI

  • Use the following command in your project directory, to install the eBay.OAuth.Client package: [source,xml] paket add eBay.OAuth.Client --version 2.0.0

  • After the command completes, open the .csproj file to see the added reference: [source,xml] <ItemGroup> <PackageReference Include="eBay.OAuth.Client" Version="2.0.0" /> </ItemGroup>

== Build eBay.OAuth.Client DLL from Source

  • After cloning the project, you can build the package from the source by executing following script from project directory: [source,shell] ./build.sh

  • ebay-oauth-csharp-client.dll will be created at ebay-oauth-csharp-client/bin/Debug/net6.0

== Use the eBay.OAuth.Client in the .NET App

  1. GetApplicationToken: Use this operation when the application request an access token to access their own resources, not on behalf of a user. Learn more about https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html[Client Credentials grant flow]. [source,csharp] OAuth2Api.GetApplicationToken(OAuthEnvironment environment, IList<String> scopes)

  2. GenerateUserAuthorizationUrl: Use this operation to get the Authorization URL to redirect the user to. Once the user authenticates and approves the consent, the callback needs to be captured by the redirect URL setup by the app. [source,csharp] OAuth2Api.GenerateUserAuthorizationUrl(OAuthEnvironment environment, IList<String> scopes, String state)

  3. ExchangeCodeForAccessToken: Use this operation when an application exchanges an authorization code for an access token. After the user authenticates, approves the consent and returns to the application via the redirect URL , the application will get the authorization code from the URL and use it to request an access token. Learn more about https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html[Authorization Code grant flow]. [source,csharp] OAuth2Api.ExchangeCodeForAccessToken(OAuthEnvironment environment, String code)

  4. GetAccessToken: Usually access tokens are short lived. Use this operation to update the access token. Learn more about https://developer.ebay.com/api-docs/static/oauth-qref-auth-code-grant.html[Using a refresh token to update the access token]. [source, csharp] OAuth2Api.GetAccessToken(OAuthEnvironment environment, String refreshToken, IList<String> scopes)

== Contribution Contributions in terms of patches, features, or comments are always welcome. Refer to link:CONTRIBUTING.adoc[CONTRIBUTING] for guidelines. Submit Github issues for any feature enhancements, bugs, or documentation problems as well as questions and comments.

== License Copyright (c) 2018-2019 eBay Inc.

Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file or at https://opensource.org/licenses/Apache-2.0.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on eBay.OAuth.Client:

Package Downloads
Goldfield.Retail.Ebay

Package Description

eBay.BuyFeedV1.Client

This SDK is intended to provide an easy way to filter for item in the latest feed file for a particular marketplace and category. It also provides a way to download the feed file.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.2 8,375 9/5/2023
2.0.1 721 8/24/2023
2.0.0 723 8/22/2023
1.0.1 98,518 8/26/2019
1.0.0 36,897 1/17/2019