Documentation

Retrieves the AES key associated with a private topic.

Arguments

The Circle ID and the Topic ID.

Returns

Whether the action was successful, and the requested Encryption Key. 

API Definition

public async Task<GetTopicKeyReply> GetTopicKey(GetTopicKeyRequest request)

C# Structures

public class GetTopicKeyRequest {

  public string CircleId;

  public string TopicId;

}

public class GetTopicKeyReply 

{

  public ReturnStatus Status;

  public string EncryptionKey;

}

C# Example Code

public void GetTopicKey(string circleId, string topicId)

{

 GetTopicKeyRequest request = new GetTopicKeyRequest() { CircleId = circleId, TopicId = topicId};

 GetTopicKeyReply reply = _circle.GetTopicKey(request); 

 if (reply.Status.Result)

  {

   Console.WriteLine(reply.EncryptionKey);

}

  else

   Console.WriteLine(reply.Status.Message);

}