public async Task GenerateToken() { var response = await ClarifaiHttpClient.GetToken(ClientId, ClientSecret); if (response is TokenError) { TokenError er = (TokenError)response; _accessToken = ""; throw new Exception(er.Status_Msg); } else { Token token = (Token)response; _accessToken = token.Access_Token; } }
public async Task <object> GetToken() { var response = await ClarifaiHttpClient.GetToken(ClientId, ClientSecret); return(response); }