registerAccount

@MessageMapping(value = ["register"])
suspend fun registerAccount(@Payload account: ByteArray, @DestinationVariable client: String): RSocketResponse

Register Account request/response RSocket API. Takes as argument an RegisterAccount encoded in ProtoBuf format in payload. In metadata takes the client path as String.

Registers an account and creates an empty linked device for the receiving Msisdn. After this call end-user is expected to call "keys.{client}.set" API to complete the set-up-device phase.

Returns a HubPayload encoded in ProtoBuf format. In case the operation was successful the HubPayload contains data with the resulted Account. Else it contains error with the corresponding code. If there is already a registered account with the same uuid it returns code 409. In case format of RegisterAccount is not as expected, then it returns code 400. In case the Account have been blocked by the Hub it returns code 403.