Xero でアクセス トークンを生成するには、リンク Xero-NetStandard をたどっています。
namespace AsyncMain{
class Program
{
static async Task Main(string[] args)
{
var helloWorld = await GetHelloWorldAsync();
Console.WriteLine(helloWorld);
}
static async Task<string> GetHelloWorldAsync()
{
XeroConfiguration XeroConfig = new XeroConfiguration
{
ClientId = System.Environment.GetEnvironmentVariable("CLIENT_ID"),
ClientSecret = System.Environment.GetEnvironmentVariable("CLIENT_SECRET")
};
var client = new XeroClient(XeroConfig);
var xeroToken = await client.RequestClientCredentialsTokenAsync();
return xeroToken.AccessToken;
}
}}
上記のコードは、正しいクライアント ID とクライアント シークレットを渡しても、常に「unauthorized_client」例外をスローします。
これを解決するのを手伝ってください。
前もって感謝します