Closed foxi69 closed 1 year ago
You could always call AccountGetDetailsAsync
. If this fails somehow, then the API key probably isn't valid.
You should get an UnauthorizedAccessException
if it wasn't valid (versus a timeout or any other issue that might be)
Okay, can you help me how to do it?
TMDbLib.Objects.Authentication.GuestSessionRequiredException
TMDbClient client = new TMDbClient(tmdbApiKey);
var result = client.AccountGetDetailsAsync().Result;
Maybe the GetConfig
calls then?
Yes, it works thanks!
Hi,
Is there anyway to test the api key is valid in code?