Skip to main content
reference

BackendRequester

Tool for direct requests to PrivMX Bridge.

Constants

Static Methods

backendRequest(serverUrl:memberToken:method:paramsAsJson:)

Makes a direct request to PrivMX Bridge. This function allows you to make direct API requests to PrivMX Bridge with the required authorization and parameters. The response is returned as a string, representing the result of the request.

public static func backendRequest(
serverUrl: std.string,
memberToken: std.string,
method: std.string,
paramsAsJson: std.string
) throws -> std.string

NameTypeDescription
serverUrlstd.stringThe URL of PrivMX cloud server to which the request will be sent.
memberTokenstd.stringThe authorization token for the member making the request.
methodstd.stringThe API method or endpoint to be called on PrivMX Bridge.
paramsAsJsonstd.stringThe parameters for the request, formatted as a JSON string.

TypeDescription
std.string

backendRequest(serverUrl:method:paramsAsJson:)

Makes a direct request to PrivMX Bridge. This function allows you to make direct API requests to PrivMX Bridge with the required parameters. The response is returned as a string, representing the result of the request.

public static func backendRequest(
serverUrl: std.string,
method: std.string,
paramsAsJson: std.string
) throws -> std.string

NameTypeDescription
serverUrlstd.stringThe URL of PrivMX cloud server to which the request will be sent.
methodstd.stringThe API method or endpoint to be called on PrivMX Bridge.
paramsAsJsonstd.stringThe parameters for the request, formatted as a JSON string.

TypeDescription
std.string

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

Sends a request to PrivMX Bridge API using pair of API KEY ID and API KEY SECRET for authorization.

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

NameTypeDescription
serverUrlstd.stringPrivMX Bridge server URL
apiKeyIdstd.stringAPI KEY ID (see PrivMX Bridge API for more details)
apiKeySecretstd.stringAPI KEY SECRET (see PrivMX Bridge API for more details)
modeInt64allows you to set whether the request should be signed (mode = 1) or plain (mode = 0)
methodstd.stringAPI method to call
paramsAsJsonstd.stringAPI method’s parameters in JSON format

TypeDescription
std.string A string containing the response from PrivMX Bridge, typically in JSON format.