Pub Sub - Negotiate

Negotiate a SignalR Connection to the PubSub service, as the first step of establishing the connection. Note: SignalR client implementations expect the Hub URL to omit the /negotiate portion of this path (ex: HubConnection should be passed a URL that ends in ...playfabapi.com/pubsub). When starting the connection, SignalR clients will automatically append /negotiate to the end of the URL of the hub. The SignalR client will interpret the response object to establish a persistent connection to PubSub. https://docs.microsoft.com/aspnet/core/signalr/dotnet-client#connect-to-a-hub https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md#post-endpoint-basenegotiate-request

POST https://titleId.playfabapi.com/PubSub/Negotiate

Request Header

Name Required Type Description
X-EntityToken True

string

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Request Body

Name Type Description
CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Responses

Name Type Description
200 OK

PubSubNegotiateResult

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-EntityToken

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

PubSubNegotiateRequest

SignalR clients make this request to initiate their connection to the PubSubHub SignalR service. Clients will interpret the response and make a persistent websocket connection to the service with the details.

PubSubNegotiateResult

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code

integer

Numerical HTTP code

error

string

Playfab error code

errorCode

integer

Numerical PlayFab error code

errorDetails

object

Detailed description of individual issues with the request object

errorMessage

string

Description for the PlayFab errorCode

status

string

String HTTP code

PubSubNegotiateRequest

SignalR clients make this request to initiate their connection to the PubSubHub SignalR service. Clients will interpret the response and make a persistent websocket connection to the service with the details.

Name Type Description
CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

PubSubNegotiateResult

Name Type Description
AccessToken

string

The access token for the PubSub Azure SignalR service.

Url

string

The Url of the PubSub Azure SignalR endpoint.

Error Codes

Name Code
InternalServerError 1110
PubSubFeatureNotEnabledForTitle 2500
PubSubTooManyRequests 2501
ServiceUnavailable 1123