CheckApiKey

Check API Key Status.

rpc CheckApiKey

user_api.v1.CheckApiKey

Check API Key Status.

requests CheckApiKeyRequest

user_api.v1.CheckApiKeyRequest

resp, _ := apiKeyManagerService.CheckApiKey(ctx, &v1.CheckApiKeyRequest{})
fmt.Println(resp)
const checkapikeyrequest = new CheckApiKeyRequest();

service.checkApiKey(checkapikeyrequest, (err, value:CheckApiKeyResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using UserApi.V1;

namespace main
{
  class Program
  {
    static void Main(string[] args)
    {
      Channel channel = new Channel("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure); 
      var client = new ApiKeyManagerService.ApiKeyManagerServiceClient(channel); 
      var headers = new Metadata();
      var checkApiKeyRequest = new CheckApiKeyRequest{};
      var reply = client.CheckApiKey(checkApiKeyRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import user_api.v1.ApiKeyManagerServiceGrpc;
import user_api.v1.User.CheckApiKeyRequest;
import user_api.v1.User.CheckApiKeyResponse;

public class App {
  public static void main(String[] args) {
    ManagedChannel channel = ManagedChannelBuilder
      .forAddress("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
      .usePlaintext()
      .build();
    ApiKeyManagerServiceGrpc.ApiKeyManagerServiceBlockingStub blockStub =
        ApiKeyManagerServiceGrpc.newBlockingStub(channel);
    
    CheckApiKeyRequest req_CheckApiKeyRequest =
        CheckApiKeyRequest.newBuilder()
          .build();
    CheckApiKeyResponse resp = blockStub.checkApiKey(req_CheckApiKeyRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const checkapikeyrequest = new CheckApiKeyRequest();

service.checkApiKey(checkapikeyrequest, (err, value) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;

use grpc-sdks::user_api::v1::api_key_manager_service_client::ApiKeyManagerServiceClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let channel = Channel::from_static("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io")
    .connect()
    .await?;
  let mut client = ApiKeyManagerServiceClient::new(channel); 

  let request = tonic::Request::new(
    ());
// sending request and waiting for response
  let response = client.check_api_key(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import user_api.v1.ApiKeyManagerServiceGrpc
import user_api.v1.User.CheckApiKeyRequest
import user_api.v1.User.CheckApiKeyResponse

fun main() {
    val channel = ManagedChannelBuilder
            .forAddress("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
            .usePlaintext()
            .build()
    var blockStub = ApiKeyManagerServiceGrpc.newBlockingStub(channel)
    
    val req_CheckApiKeyRequest = CheckApiKeyRequest.newBuilder()
          .build()
    val resp = blockStub.checkApiKey(req_CheckApiKeyRequest)
    println(resp)
    channel.shutdown()
}


returns CheckApiKeyResponse

user_api.v1.CheckApiKeyResponse

FieldTypeDescription
is_validboolReturns the validity of the API key.
{
  "is_valid": true
}