convert to delphi from c# code bearer token

Viewed 55

How to do this in Delphi with Indy http? How do i go about the requestoptions and getclienttokenasync part.

var tokenClientId = "***secret value***";
var tokenClientSecret = "***secret value ***";
var tokenScopes = "api";
 
/*
 * This value will change depending on environment.
 * This specific value will work in the local development environment.
 */
var authTokenUri = "http://test.com/dev";
 
// This value only needs to be true when running locally.
var devMode = true;
 
PlatformTokenRequestOptions options = new PlatformTokenRequestOptions(tokenClientId, tokenClientSecret, tokenScopes, authTokenUri, devMode);
 
var request = await new PlatformTokenRequester(new HttpClient()).GetClientTokenAsync(options);
0 Answers
Related