You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the instructions listed in the readme. I confirmed authorization URL is correct and matched what I see in the API Explorer. I am able to get a user token using the User Tokens section of eBay Developers website. However, the SDK is returning, "invalid_grant...the provided authorization grant code is invalid or was issue to another client". Here is the C# .NET 8 console application code. What am I doing wrong or it there a bug?
using eBay.ApiClient.Auth.OAuth2;
using eBay.ApiClient.Auth.OAuth2.Model;
CredentialUtil.Load("ebay-config.yaml");
OAuth2Api ebayApi = new OAuth2Api();
string userAuthorizationUrl = ebayApi.GenerateUserAuthorizationUrl(OAuthEnvironment.PRODUCTION, new List<string>()
{
"https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly"
}, null);
if (!string.IsNullOrEmpty(userAuthorizationUrl))
{
Console.WriteLine($"Authorization Url: {userAuthorizationUrl}");
OAuthResponse response = ebayApi.ExchangeCodeForAccessToken(OAuthEnvironment.PRODUCTION, userAuthorizationUrl);
if (response != null && response?.AccessToken == null)
{
Console.WriteLine($"Error Getting Token: {response?.ErrorMessage}");
}
else
{
Console.WriteLine($"Access Token: {response?.AccessToken}");
}
}
else
{
Console.WriteLine("Failed to get authorization URL");
}
The text was updated successfully, but these errors were encountered:
Without reviewing your code: I guess it is not compatible with .NET 8. Did you try to downgrade to .NET 6 for testing purposes?
Otherwise just download and copy classes into your project until this repo gets updated.
I followed the instructions listed in the readme. I confirmed authorization URL is correct and matched what I see in the API Explorer. I am able to get a user token using the User Tokens section of eBay Developers website. However, the SDK is returning, "invalid_grant...the provided authorization grant code is invalid or was issue to another client". Here is the C# .NET 8 console application code. What am I doing wrong or it there a bug?
The text was updated successfully, but these errors were encountered: