Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public async void getapi2token(){
var AuthAPI = new AuthenticationApiClient(new Uri(""));
var api2Response = await AuthAPI.GetTokenAsync(new ClientCredentialsTokenRequest
ClientId = "43BKVc57RgIiVJrbM8gRDIBQgofdByYe",
ClientSecret = "xxx",
Audience = string.Format("https://{0}/api/v2/", "")
System.Console.Write(api2Response.AccessToken.ToString() + "\n"); // This is our Access Token
var managementApi = new ManagementApiClient(api2Response.AccessToken.ToString(), new Uri(string.Format("https://{0}/api/v2", "")));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment