Closed scottkuhl closed 6 years ago
@scottkuhl The reason for the exception is that the request itself has an optional OAuth requirement and the library ignores this fact.
A workaround would be to set client.Configuration.ForceAuthorization
to true
.
Thank you, I will give that a shot and see if it fixes it.
That did the trick. You can close the issue. Thanks!
Trakt API Sharp Version: 0.11.0
When trying to access resources in the Trakt API that require OAuth authentication I am getting the following error:
TraktApiSharp.Exceptions.TraktAuthorizationException: Unauthorized - OAuth must be provided
at TraktApiSharp.Requests.Base.TraktRequest'3.d71.MoveNext() in C:\projects\traktapisharp\Source\Lib\TraktApiSharp\Requests\Base\TraktRequest.cs:line 368
at TraktApiSharp.Requests.Base.TraktRequest'3.d 8.MoveNext() in C:\projects\traktapisharp\Source\Lib\TraktApiSharp\Requests\Base\TraktRequest.cs:line 50
at TraktApiSharp.Modules.TraktBaseModule.d4`2.MoveNext() in C:\projects\traktapisharp\Source\Lib\TraktApiSharp\Modules\TraktBaseModule.cs:line 0
at TraktApiSharp.Modules.TraktUsersModule.d 11.MoveNext() in C:\projects\traktapisharp\Source\Lib\TraktApiSharp\Modules\TraktUsersModule.cs:line 335
at Conduktor.Controllers.HomeController.d__2.MoveNext() in C:\Users\scott\source\repos\Conduktor\Conduktor\Controllers\HomeController.cs:line 58
Here is the code in a ASP.NET Core 2.0 Controller that can produce it: