PrivMX DOCS
API Reference/PrivMX Endpoint Swift Extra/Core

BackendRequester

Tool for direct requests to PrivMX Bridge.

Static Methods

backendRequest(serverUrl:memberToken:method:paramsAsJson:)

Performs a backend request to PrivMX Bridge. This method sends a request to PrivMX Bridge using its REST API with the appropriate authorization. The full Bridge API can be accessed using this method. The request is authenticated using a server token, and parameters are provided in JSON format.

Params

serverUrl

String

The URL of PrivMX Bridge server.

memberToken

String

The authentication token provided by the server.

method

String

The API endpoint to be called (HTTP method, such as POST, GET, etc.).

paramsAsJson

String

The parameters to be sent with the request, formatted as a JSON string.

public static func backendRequest(
serverUrl: String,
memberToken: String,
method: String,
paramsAsJson: String
) throws -> String

Returns

String · The result body as a String, representing the response from the backend.

backendRequest(serverUrl:method:paramsAsJson:)

Performs a backend request to the PrivMX Bridge. This method sends a request to the PrivMX Bridge using its REST API.. The parameters are provided in JSON format.

Params

serverUrl

String

The URL of the PrivMX Bridge server.

method

String

The API endpoint to be called (HTTP method, such as POST, GET, etc.).

paramsAsJson

String

The parameters to be sent with the request, formatted as a JSON string.

public static func backendRequest(
serverUrl: String,
method: String,
paramsAsJson: String
) throws -> String

Returns

String · The result body as a String, representing the response from the backend.

backendRequest(serverUrl:apiKeyId:apiKeySecret:mode:method:paramsAsJson:)

Performs a backend request to the PrivMX Bridge. This method sends a request to the PrivMX Bridge using its REST API with the appropriate authorization. The full Bridge API can be accessed using this method. The request is authenticated using a server token, and parameters are provided in JSON format.

Params

serverUrl

String

PrivMX Bridge server URL

apiKeyId

String

API KEY ID (see PrivMX Bridge API for more details)

apiKeySecret

String

API KEY SECRET (see PrivMX Bridge API for more details)

mode

Int64

allows you to set whether the request should be signed (mode = 1) or plain (mode = 0)

method

String

API method to call

paramsAsJson

String

API method’s parameters in JSON format

public static func backendRequest(
serverUrl: String,
apiKeyId: String,
apiKeySecret: String,
mode: Int64,
method: String,
paramsAsJson: String
) throws -> String

Returns

String · The result body as a String, representing the response from the backend.

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.

PrivMX Endpoint Swift v2.3

This package is not up to date with the core documentation. Some of the features you've seen described in other parts of the documentation might not be mentioned here. Those changes do not influence compatibility, however