Admin API to finish the user registration process.
rpc ConfirmUser
ConfirmUser
user_api.v1.ConfirmUser
user_api.v1.ConfirmUser
Admin API to finish the user registration process.
requests ConfirmUserRequest
ConfirmUserRequest
user_api.v1.ConfirmUserRequest
user_api.v1.ConfirmUserRequest
Field | Type | Description |
---|---|---|
email_or_phone | string | Confirmation method for user registration. |
token | string | Token received from previous request. |
resp, _ := userApiService.ConfirmUser(ctx, &v1.ConfirmUserRequest{
EmailOrPhone: "EMAIL_OR_PHONE",
Token: "TOKEN",
})
fmt.Println(resp)
const confirmuserrequest = new ConfirmUserRequest();
confirmuserrequest.setEmailOrPhone("EMAIL_OR_PHONE");
confirmuserrequest.setToken("TOKEN");
service.confirmUser(confirmuserrequest, (err, value:ConfirmUserResponse|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 UserApiService.UserApiServiceClient(channel);
var headers = new Metadata();
var confirmUserRequest = new ConfirmUserRequest{
EmailOrPhone = "EMAIL_OR_PHONE",
Token = "TOKEN",
};
var reply = client.ConfirmUser(confirmUserRequest, 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.User.ConfirmUserRequest;
import user_api.v1.User.ConfirmUserResponse;
import user_api.v1.UserApiServiceGrpc;
public class App {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forAddress("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build();
UserApiServiceGrpc.UserApiServiceBlockingStub blockStub =
UserApiServiceGrpc.newBlockingStub(channel);
ConfirmUserRequest req_ConfirmUserRequest =
ConfirmUserRequest.newBuilder()
.setEmailOrPhone("EMAIL_OR_PHONE")
.setToken("TOKEN")
.build();
ConfirmUserResponse resp = blockStub.confirmUser(req_ConfirmUserRequest);
System.out.println(resp);
channel.shutdown();
}
}
const confirmuserrequest = new ConfirmUserRequest();
confirmuserrequest.setEmailOrPhone("EMAIL_OR_PHONE");
confirmuserrequest.setToken("TOKEN");
service.confirmUser(confirmuserrequest, (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::user_api_service_client::UserApiServiceClient;
use grpc-sdks::user_api::v1::ConfirmUserRequest;
#[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 = UserApiServiceClient::new(channel);
let request = tonic::Request::new(
ConfirmUserRequest{
email_or_phone: String::from("EMAIL_OR_PHONE"),
token: String::from("TOKEN")
});
// sending request and waiting for response
let response = client.confirm_user(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import user_api.v1.User.ConfirmUserRequest
import user_api.v1.User.ConfirmUserResponse
import user_api.v1.UserApiServiceGrpc
fun main() {
val channel = ManagedChannelBuilder
.forAddress("user-mgmt.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build()
var blockStub = UserApiServiceGrpc.newBlockingStub(channel)
val req_ConfirmUserRequest = ConfirmUserRequest.newBuilder()
.setEmailOrPhone("EMAIL_OR_PHONE")
.setToken("TOKEN")
.build()
val resp = blockStub.confirmUser(req_ConfirmUserRequest)
println(resp)
channel.shutdown()
}
returns ConfirmUserResponse
ConfirmUserResponse
user_api.v1.ConfirmUserResponse
user_api.v1.ConfirmUserResponse
{}