Is anyone authenticating using the .NET SDK?
I am getting the access code just fine and authenticating using POSTMAN and it is returning the authentication token. I have also build my own oauth class to make the calls to get the access code and then auth token. These methods both work.
However when I look at this article https://apisupport.myob.com/hc/en-us/articles/5215765325071-Cloud-Service
it shows to insert the access code in this line
var tokens = oauthService.GetTokens(OAuthLogin.GetAuthorizationCode(configuration));
but that gives me a 400 bad request.
Like I said in my own code I retrieve the token just fine and end up doing this instead assigning the token I get to the keystore.OAuthResponse and thisends up working fine
var keystore = new SimpleOAuthKeyService(); keystore.OAuthResponse = new OAuthTokens { AccessToken = myobTokens.AccessToken, ExpiresIn = int.Parse(myobTokens.ExpiresIn), ReceivedTime = myobTokens.TokenTime, RefreshToken = myobTokens.RefreshToken, Scope = myobTokens.Scope, TokenType = myobTokens.TokenType };
but it leads me to belive that the SDK is not working for authentication...have I got this wrong? is anyone using the SDK Authentication successfully by passing the access code in? or is noone using the SDK? have you just built your own clients for accessing the API?
Have I got the code wrong?
I am assuming that the parameter "code" (see screenshot) is referring to the access code. Can someone confirm this please