Updated on 2024-12-30 GMT+08:00

Verifying Callback URL

If the URL for the enterprise application to receive event push is https://{app_domain}/callback, OneAccess will send a verification event to this URL when the administrator saves the callback configuration.

URL

POST https://{app_domain}/callback

Request Header

Authorization: Bearer {access_token}

Request Parameters

Table 1 Request parameters

Parameter

Type

Description

nonce

String

Random number, which is used together with timestamp to prevent replay attacks on requests.

timestamp

Integer

Timestamp, which is used together with nonce to prevent replay attacks on requests.

eventType

String

Event type. The value is CHECK_URL here.

data

String

Message body. If encryption is disabled, the random string is sent in plaintext. If encryption is enabled, the random string must be decrypted to reveal the content. After decryption, the random and msg fields will be displayed. The msg field contains the plaintext message content.

signature

String

Message signature. The signature is calculated based on the signature key (signatureSaltValue) provided by the enterprise application, along with the timestamp, nonce from the request, and the encrypted message body.

Response Parameters

Table 2 Response parameters

Parameter

Type

Description

code

String

Return code. The value 200 indicates success. For details about error codes, see Common Return Codes.

message

String

Response description.

data

String

  • If encryption is disabled, the plaintext random string in the request body is returned.
  • If encryption is enabled, the encrypted random string in the request body is decrypted and the value of the re-encrypted random string is returned. The content must be decrypted, after which the random and msg fields are generated. The msg field contains the plaintext message content.

Example Request

  • Example request with message signature and encryption disabled:
    {
    	"nonce": "bqVHvThFGooCRjSf",
    	"timestamp": 1573784783795,
    	"eventType": "CHECK_URL",
    	"data": "random string",
    	"signature": ""
    }
  • Example request with message signature and encryption enabled:
    {
    	"nonce": "jmgjjEAJbrMzWmUw",
    	"timestamp": 15093849585,
    	"eventType": "CHECK_URL",
    	"data": "jRqGWO08Tyuxq+ChqGFk7SiPCt6MgcUDvzP5CBYnD30=",
    	"signature": "K08yDiTEc094KoccOY+VYLQFxxQ="
    }

Example Response

Status code: 200

Request successful.

  • Response example with message signature and encryption disabled:
    {
    	"code": "200",
    	"data": " 2852325935078140700",
    	"message": "success"
    }
  • Response example with message signature and encryption enabled:
    {
    	"code": "200",
    	"message": "success",
    	"data": "u5GkfEdZC0EDvDldLWBK/w=="
    }