/api/negotiate

get
Negotiate

https://{yourEndpoint}/api/negotiate
Calling the negotiate endpoint along with generated UUID in x-tezos-live-userid HTTP header will return url and accessTokenin the response, which you will use for SignalR hub connection.
Request
Response
Headers
x-tezos-live-userid
required
string
UUID client identification
200: OK
{
"url":"https://{yourEndpoint}.signalr.net/client/?hub=broadcast",
"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}

You will need the

  • url Response parameter for SignalR hub connection

  • accessToken Response parameter for SignalR hub connection

  • x-tezos-live-userid parameter for Subscribe/Unsubscribe calls

For generating UUIDs you can use any library, that complies with RFC4122. For example https://www.npmjs.com/package/uuid. You can also use different method for generating userIds, as long as you can ensure, that each client will have unique id.