I am trying to implement oauth2 for the new Finance functionality. I can get a user consent code just fine, but every time I try and mint a user auth token I get the following error: "the provided authorization grant code is invalid or was issued to another client" I can see others are having similar issues - anyone know how to sort this? For some reason I don't seem to be able to respond to other peoples threads on this forum also? Dim UserTokenClient As RestClient = New RestClient("
https://api.ebay.com/identity/v1/oauth2/token") Dim UserTokenRequest As RestRequest = New RestRequest() UserTokenRequest.AddHeader("Content-Type", "application/x-www-form-urlencoded") UserTokenRequest.AddHeader("Authorization", "Basic " & Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(ClientId & ":" & ClientSecret))) UserTokenRequest.AddParameter("grant_type", "authorization_code") UserTokenRequest.AddParameter("redirect_uri", ClientId) UserTokenRequest.AddParameter("code", HttpUtility.UrlEncode(UserAccessToken)) Dim AccessTokenResponse = UserTokenClient.Post(UserTokenRequest) ,
Oops... left over from messing around. Even with the proper RuName in there it still gives the same error. If I don't include a RuName at all I get the 'malformed' error back. If I do include I get the another client message - the RuName and ClientId are the exact same ones used in the call to get the user consent so I really don't get why it is returning this?