--- title: "getPreparedSecureChallenge (Service) [v2]" slug: "dpgw-ig-scan-and-login-getpreparedsecurechallenge-service-v2-5-11" updated: 2025-07-04T10:05:56Z published: 2025-07-07T16:28:37Z canonical: "docs.onespan.com/dpgw-ig-scan-and-login-getpreparedsecurechallenge-service-v2-5-11" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # getPreparedSecureChallenge (Service) [v2] > API version: 2 > > Availability: DIGIPASS Gateway 5.10 and later > > Authentication: Basic HTTP authentication using the front-end API key. The getPreparedSecureChallenge service retrieves a prepared authentication request. The respective authentication request is identified by a challenge key previously received on the mobile device by scanning a Cronto image. Only one application is allowed to retrieve the authentication request. The challenge key is consumed by the first application retrieving the secure challenge message, subsequent attempts to retrieve it will fail with status code STAT_NOT_FOUND. Depending on the user’s choice the mobile application can either complete the authentication request (see [authUser (service) [v2]](/sec/docs/dpgw-ig-scan-and-login-authuser-service-v2-5-11)) or cancel it (see [cancelAuthUser (service) [v2]](/sec/docs/dpgw-ig-scan-and-login-cancelauthuser-service-v2-5-11)). ## URL https://dpgateway_host:dpgateway_port/rest/v2/authentication/scan/getPreparedSecureChallenge ## Request | getPreparedSecureChallenge parameters | | --- | | Parameter name | Data type | Description | | serialNumber | String | Required. The unique identifier of the Digipass instance. This is the concatenation of the Digipass serial number and the Digipass sequence number, separated by a dash. | | challengeKey | String | Required. The unique identifier used by OneSpan Authentication Server to identify a login request. | ### Example ```json {  "serialNumber": "VDS1000000-1",  "challengeKey": "1234567890", } ``` ## Response | getPreparedSignatureRequest return values | | --- | | Return value | Description | | resultCodes | A JSON object that contains the return and status codes of the service. | | result | A JSON object that contains the actual authentication request as a Secure Channel message (requestMessage). | ### Example ```json {  "resultCodes":    {      "returnCodeEnum": "RET_SUCCESS",      "statusCodeEnum": "STAT_SUCCESS",      "returnCode": 0,      "statusCode": 0    },  "result":    {      "requestMessage": "2EAA8300F254C137B35237560CCBFE98..."    } } ```