Endpoint: !initCustomerSession
https://secure.trust-provider.com/products/download/!initCustomerSession
The !initCustomerSession API action creates a session, enabling the display of the Validation Manager tool to the end user for the associated certificate order on your side.
Use the POST method for this endpoint.
Submit parameters in the x-www-form-urlencoded format.
The following table lists the required and optional parameters.
| Parameter | Type | Requirement | Max. Length | Description |
|---|---|---|---|---|
|
string |
required |
64 chars |
Your account username. This value is case sensitive. |
|
string |
required |
128 chars |
Your account password. This value is case sensitive. |
|
string |
required |
64 chars |
The order number for which you want the Validation Manager tool to be displayed. |
|
char |
optional |
1 char |
Specifies the response format. The possible options are:
|
Sample request
curl --location --request POST 'https://secure.trust-provider.com/products/!initCustomerSession' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'loginName=yourLoginName' \
--data-urlencode 'loginPassword=yourPassword' \
--data-urlencode 'orderNumber=yourOrderNumber'
Response
The MIME type will be text/plain, if the responseFormat=0 (by default).
The response consists of two or more lines.
The first line is an errorCode.
If the errorCode is less than 0, the second line displays the errorMessage, describing the error.
If the errorCode equals 0, the response consists of three lines:
-
line 1 =
errorCode. -
line 2 =
SID— Identifier of a created session handle (type=string, max size=16 chars). -
line 3 =
orderNumber— Order number of a certificate which the Validation Manager page is made available for. If the given order (request parameterorderNumber) has replacements, the most recent replacement of the order number will be returned.
The MIME type will be application/x-www-form-urlencoded, if the responseFormat=1.
Response parameters
The following table displays the content that can appear in the response.
| Parameter | Type | Description |
|---|---|---|
|
integer |
A numeric code that identifies the type of error. For more information, see Error codes. |
|
string |
A description of the error. This parameter is not present when |
|
Session handle. This parameter is only present when |
|
|
The order number of a certificate which the Validation Manager page is made available for. If the given order (request parameter This parameter is only present when |
Error codes
The following table outlines error responses returned by the initCustomerSession API endpoint.
Each error response consists of an errorCode and an errorMessage indicating why the request failed.
| Error code | Error message | Description |
|---|---|---|
|
|
The request must use HTTPS protocol. |
|
|
The provided argument is not recognized. |
|
|
The required argument is missing from the request. |
|
|
The argument value does not meet validation requirements. |
|
|
An unknown error occurred. |
|
|
Authentication failed due to incorrect login details, a locked account, an expired password, or a blocked source IP address. |
|
|
The request method should be |
|
|
The maximum number of allowed API requests has been exceeded. Please wait before submitting additional requests. |
|
|
The certificate cannot be revoked in its current state. |
|
|
The certificate revocation failed due to a general error. |