title: How to properly prepare JsonWebKey for API request?
body: <pre><code>{
  &quot;client_name&quot;: &quot;apk1&quot;,
  &quot;scopes&quot;: [
      &quot;full&quot;
  ],
  &quot;jwks&quot;: {
      &quot;keys&quot;: [
          {
              &quot;kty&quot;: &quot;RSA&quot;,
              &quot;e&quot;: &quot;AQAB&quot;,
              &quot;use&quot;: &quot;sig&quot;,
              &quot;kid&quot;: &quot;xxxxxxxxxxxxxx&quot;,
              &quot;alg&quot;: &quot;RS512&quot;,
              &quot;n&quot;: &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;
          }
      ]
  }}
  </code></pre>
  <p>Api expects such json. Can anyone advise me on how to properly deliver jwks? I tried to use the JsonWebKey class but I have no idea how to get the structure like above in json.</p>
  <pre><code> var client = new RestClient(&quot;url&quot;);
          var request = new RestRequest(&quot;/auth/token&quot;, Method.Post);
          request.AddHeader(&quot;content-type&quot;, &quot;application/json&quot;);
          request.AddHeader(&quot;Accept&quot;, &quot;application/json&quot;);
          request.AddHeader(&quot;Authorization&quot;, &quot;Bearer &quot; + Authtoken);
  
          RSA rsa = RSA.Create(2048);
          var rs256 = new RS256Algorithm(rsa, rsa);
  
          //var token = GenerateToken(1);
  
          RSA rsa = RSA.Create(2048);
          var parameters = rsa.ExportParameters(true);
          var rsaSecurityKey = new RsaSecurityKey(parameters);
          var jwk = JsonWebKeyConverter.ConvertFromRSASecurityKey(rsaSecurityKey);
  
          request.AddJsonBody(new
          {
              client_name = &quot;client_name&quot;,
              scopes = new[] { &quot;full&quot; },
              jwks = new { keys = new[] { jwk } }
          });
  
          var TaskResponse = client.ExecutePostAsync&lt;CreateClientResponse&gt;(request);
          TaskResponse.Wait();
  </code></pre>