Auth0 Home Blog Docs

Auth0.Core.Exceptions.ApiException: 'Missing Authentication Token'


#1

Hello, new to Auth0 and attempting to receive new token from authentication server. Here is my code in C# Console app using Auth0.AuthenticationApi and Auth0.AuthenticationApi.Models. Results in Auth0.Core.Exceptions.ApiException: ‘Missing Authentication Token’ when calling TokenGrant().

static async void TokenGrant()
        {
            var client = new AuthenticationApiClient("..");

            await client.GetTokenAsync(new AuthorizationCodeTokenRequest
            {
                ClientId = "..",
                ClientSecret = ".."
            });

            Console.WriteLine("Response received!");
        }