{"id":13696599,"url":"https://github.com/eBay/ebay-oauth-csharp-client","last_synced_at":"2025-05-03T17:31:50.110Z","repository":{"id":34034284,"uuid":"166130358","full_name":"eBay/ebay-oauth-csharp-client","owner":"eBay","description":"eBay OAuth C# Client Library","archived":false,"fork":false,"pushed_at":"2024-10-23T19:18:34.000Z","size":6829,"stargazers_count":57,"open_issues_count":25,"forks_count":42,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-24T05:51:06.537Z","etag":null,"topics":["authentication","csharp","ebay-api","ebay-sdk"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eBay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-17T00:01:46.000Z","updated_at":"2024-10-22T17:31:06.000Z","dependencies_parsed_at":"2024-09-10T00:12:36.706Z","dependency_job_id":"81d57a33-6e7c-4e05-914d-ada0539a9eef","html_url":"https://github.com/eBay/ebay-oauth-csharp-client","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"b9ef6fadef1366aabddf5be725d1fbd8135c1fe3"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Febay-oauth-csharp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Febay-oauth-csharp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Febay-oauth-csharp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Febay-oauth-csharp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eBay","download_url":"https://codeload.github.com/eBay/ebay-oauth-csharp-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224369645,"owners_count":17299935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","csharp","ebay-api","ebay-sdk"],"created_at":"2024-08-02T18:00:43.239Z","updated_at":"2024-11-13T00:30:48.570Z","avatar_url":"https://github.com/eBay.png","language":"C#","funding_links":[],"categories":["C\\#","Csharp"],"sub_categories":[],"readme":"# Summary\n\nTo make integrations with eBay RESTful APIs easier, eBay provides client\nlibraries in C# and Java to make it simpler to set up authorization,\nreduce the amount of code the application developers have to write to\nget OAuth Access Tokens. This library in addition to functioning as a\nsimple eBay OAuth Client, helps with additional features such as cached\nApp tokens.\n\n# What is OAuth 2.0\n\n[OAuth 2.0](https://tools.ietf.org/html/rfc6749) is the\nindustry-standard protocol for authorization to obtain limited access to\nan HTTP service. All [eBay RESTful\nAPIs](https://developer.ebay.com/docs) use the OAuth 2.0 protocol for\nauthorization. OAuth access tokens verify to eBay that a request is\ncoming from a valid client and that the application has the user’s\nauthorization to carry out the requests. Learn more about the [OAuth\nAccess\nTokens](https://developer.ebay.com/api-docs/static/oauth-tokens.html).\n\n# Supported Languages\n\neBay OAuth Client is a class library that targets the .NET Standard 2.0.\nThis library can be used by any .NET implementation that supports 2.0\nversion of the .NET Standard.\n\n# Add the eBay.OAuth.Client NuGet Package\n\n**Current Version** : 2.0.3\n\nUse of this source code is governed by [Apache-2.0\nlicense](https://opensource.org/licenses/Apache-2.0).If you’re looking\nfor the latest stable version (2.0.3), you can grab it directly from\nNuGet.org.\n\n``` xml\nhttps://www.nuget.org/packages/eBay.OAuth.Client\n```\n\n## NuGet Package Manager UI\n\n- In **Solution Explorer**, right-click NuGet in .csproj and choose\n  **Add Package**.\n\n- Search for **eBay.OAuth.Client**, select that package in the list, and\n  click on **Add Package**\n\n- **Accept** the License prompt\n\n## Package Manager Console\n\n- Use the following command in your project directory, to install the\n  **eBay.OAuth.Client** package:\n\n``` xml\nInstall-Package eBay.OAuth.Client -Version 2.0.3\n```\n\n- After the command completes, open the **.csproj** file to see the\n  added reference:\n\n``` xml\n\u003cItemGroup\u003e\n   \u003cPackageReference Include=\"eBay.OAuth.Client\" Version=\"2.0.3\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n## .NET CLI\n\n- Use the following command in your project directory, to install the\n  **eBay.OAuth.Client** package:\n\n``` xml\ndotnet add package eBay.OAuth.Client --version 2.0.3\n```\n\n- After the command completes, open the **.csproj** file to see the\n  added reference:\n\n``` xml\n\u003cItemGroup\u003e\n   \u003cPackageReference Include=\"eBay.OAuth.Client\" Version=\"2.0.3\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n## Paket CLI\n\n- Use the following command in your project directory, to install the\n  **eBay.OAuth.Client** package:\n\n``` xml\npaket add eBay.OAuth.Client --version 2.0.3\n```\n\n- After the command completes, open the **.csproj** file to see the\n  added reference:\n\n``` xml\n\u003cItemGroup\u003e\n   \u003cPackageReference Include=\"eBay.OAuth.Client\" Version=\"2.0.3\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n# Build eBay.OAuth.Client DLL from Source\n\n- After cloning the project, you can build the package from the source\n  by executing following script from project directory:\n\n\u003c!-- --\u003e\n\n- **ebay-oauth-csharp-client.dll** will be created at\n  ebay-oauth-csharp-client/bin/Debug/net6.0\n\n# Use the eBay.OAuth.Client in the .NET App\n\n- Create a config [YAML](http://yaml.org/) file in your application. The\n  config file should contain your eBay applications keys: App Id, Cert\n  Id \u0026 Dev Id. A sample config file is available at\n  \u003chttps://github.com/ebay/ebay-oauth-csharp-client/blob/master/Tests/ebay-config-sample.yaml\u003e.\n  Learn more about [creating application\n  keys](https://developer.ebay.com/api-docs/static/creating-edp-account.html#Register).\n\n``` csharp\nname: ebay-config\napi.sandbox.ebay.com:\n    appid: \u003cappid-from-developer-portal\u003e\n    certid: \u003ccertid-from-developer-portal\u003e\n    devid: \u003cdevid-from-developer-portal\u003e\n    redirecturi: \u003credirect_uri-from-developer-portal\u003e\napi.ebay.com:\n    appid: \u003cappid-from-developer-portal\u003e\n    certid: \u003ccertid-from-developer-portal\u003e\n    devid: \u003cdevid-from-developer-portal\u003e\n    redirecturi: \u003credirect_uri-from-developer-portal\u003e\n```\n\n- Once the config file is ready, use following code to load it. It is\n  recommended to load the credentials during startup time\n  (initialization) to prevent runtime delays.\n\n``` csharp\nCredentialUtil.Load(“YAML config file path”);\nor\nCredentialUtil.Load(System.IO.StreamReader);\n```\n\n- Once the credentials are loaded, call any operation on **OAuth2Api**.\n\n  1.  **GetApplicationToken**: Use this operation when the application\n      request an access token to access their own resources, not on\n      behalf of a user. Learn more about [Client Credentials grant\n      flow](https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html).\n\n``` csharp\nOAuth2Api.GetApplicationToken(OAuthEnvironment environment, IList\u003cString\u003e scopes)\n```\n\n1.  **GenerateUserAuthorizationUrl**: Use this operation to get the\n    Authorization URL to redirect the user to. Once the user\n    authenticates and approves the consent, the callback needs to be\n    captured by the redirect URL setup by the app.\n\n``` csharp\nOAuth2Api.GenerateUserAuthorizationUrl(OAuthEnvironment environment, IList\u003cString\u003e scopes, String state)\n```\n\n1.  **ExchangeCodeForAccessToken**: Use this operation when an\n    application exchanges an authorization code for an access token.\n    After the user authenticates, approves the consent and returns to\n    the application via the redirect URL , the application will get the\n    authorization code from the URL and use it to request an access\n    token. Learn more about [Authorization Code grant\n    flow](https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html).\n\n``` csharp\nOAuth2Api.ExchangeCodeForAccessToken(OAuthEnvironment environment, String code)\n```\n\n1.  **GetAccessToken**: Usually access tokens are short lived. Use this\n    operation to update the access token. Learn more about [Using a\n    refresh token to update the access\n    token](https://developer.ebay.com/api-docs/static/oauth-qref-auth-code-grant.html).\n\n``` csharp\nOAuth2Api.GetAccessToken(OAuthEnvironment environment, String refreshToken, IList\u003cString\u003e scopes)\n```\n\n# Contribution\n\nContributions in terms of patches, features, or comments are always\nwelcome. Refer to [CONTRIBUTING](CONTRIBUTING.adoc) for guidelines.\nSubmit Github issues for any feature enhancements, bugs, or\ndocumentation problems as well as questions and comments.\n\n# License\n\nCopyright (c) 2018-2019 eBay Inc.\n\nUse of this source code is governed by a Apache 2.0 license that can be\nfound in the LICENSE file or at\n\u003chttps://opensource.org/licenses/Apache-2.0\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FeBay%2Febay-oauth-csharp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FeBay%2Febay-oauth-csharp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FeBay%2Febay-oauth-csharp-client/lists"}