Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
        public async Task <object> GetToken()
        {
            var response = await ClarifaiHttpClient.GetToken(ClientId, ClientSecret);

            return(response);
        }