-
Notifications
You must be signed in to change notification settings - Fork 4
AnswerChallenge
Allows to answer a Wallet Connection Challenge.
URL: /v1/wallet-connections/challenges/answer
Method: POST
Path Parameters: None
Query Parameters: None
Headers:
Content-Type: application/json
Accept: application/json
g-recaptcha-platform: Web
g-recaptcha-token: {reCAPTCHA Token for "answer_challenge" action}
Content:
Field | Type | Description | Requirement Type |
---|---|---|---|
challengeId | string | UUID of the Challenge to be answered. | Always |
payload | string | Signed payload. | Always |
key | string | Data signature public key, only if method is SignedData . |
Optional |
Content example:
{
"challengeId": "7bd2862f-8deb-4814-8943-156d9dab80dd",
"payload": "724589a0453f0681d841798aafa11be39c49215ed9031d6dc29cb79dfeda05239a0182583",
"key": "5fa11be39c49215ed9031d6d841798aadc29cb79dfeda05239a0182583031d6dc29"
}
Code: 200 OK
Headers:
Content-Type: application/json
Content:
Field | Type | Description | Condition |
---|---|---|---|
connectionId | string | UUID of the created connection. | Always |
expiresAt | string | Date and time when the Connecton will expire (ISO-8601 format). | Always |
Content example:
{
"connectionId": "d0907e3d-a9a7-43b1-93dc-f3b0ee929021",
"expiresAt": "2024-03-17T20:47:55.738918"
}
Code: 400 BAD REQUEST
Condition: If a mandatory header or content field is missing.
Headers:
Content-Type: application/json
Content example:
{
"code": 400,
"description": "Bad Request",
"cause": "Missing header: g-recaptcha-token"
}
Code: 403 FORBIDDEN
Condition: If reCAPTCHA or the signature verification fails.
Headers:
Content-Type: application/json
Content example:
{
"code": 403,
"description": "Forbidden",
"cause": "Challenge signature verification failed"
}
Code: 404 NOT FOUND
Condition: If the specified Challenge is not found.
Headers:
Content-Type: application/json
Content example:
{
"code": 404,
"description": "Not Found",
"cause": "Entity WalletConnectionChallengeEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}
Generate Wallet Connection Challenge