<aside> <img src="https://prod-files-secure.s3.us-west-2.amazonaws.com/1e47ff86-f2e4-4455-a921-e047cdf6846c/07532275-72a5-4500-938b-6d77994e18ea/1010520-200.png" alt="https://prod-files-secure.s3.us-west-2.amazonaws.com/1e47ff86-f2e4-4455-a921-e047cdf6846c/07532275-72a5-4500-938b-6d77994e18ea/1010520-200.png" width="40px" /> Table of contents
Source: https://api.singpass.gov.sg/library/verify/developers/generateqrcode
Combine URL in the format:
<https://app.singpass.gov.sg/sgverify?callback=https%3A%2F%2Ftest.yourcallbackurl%2Fcallback&client_id=STG2-SGVERIFY-SELF-TEST&nonce=4110833&qr_type=dynamic&signature_method=RS256&state=kiosk001×tamp_expiry=1602324610000×tamp_start=1570702210000&v=2&signature=h8jdRRpS5ArE0pdWDXHv04JiELnEvR54ulO7O0x//mewoZDQW+cfnSPdwC2kZZzLkMYtd2HjeTLBqTG5HKjbDiH3C5YkB9lS81mVgV3oj6E7LjzPZQgypNHzp1F3sBrj/4MNjJbL119VA15RJ0HlR1sOeF05yR7rFkDAZfRth37UFAFYoVDFzU4MwLYZt7W0eNRESXWVWLK94qqJg/ubR/xNKXqI93Tdw032DxapCIM3jLwQhk327f6a21ZpnSOKWXxWl1FUv4WcOxHXLvs8B/C43kJpn8TpGMHUyk5cRB/kFxljltH1Yq4n5ROhXFhjQUmk+nTMVsg31MKl6NKQnA==>
Pass relevant URL parameters:
Parameter | Description | Type | Example |
---|---|---|---|
callbackrequired | Your application's registered callback URL (URL encoded) for Verify to return authorization code to. | string | Example: "https%3A%2F%2Ftest.yourcallbackurl%2Fcallback" |
client_idrequired | Unique ID for your application. | string | Example: "STG2-SGVERIFY-SELF-TEST" |
nonce | Unique-random text to prevent replay attack. Note: Mandatory only if qr_type is dynamic | string | Example: 4110833 |
qr_typerequired | Type of QR | string | |
Enum: "static" "dynamic" | |||
signature_methodrequired | Signature algorithm used to produce the digital signature. | string | Default: "RS256" |
staterequired | Identifier that represents the user's session/transaction with the client for reconciling query and response. The same value will be sent back via the callback URL. Use a unique system generated number for each user/transaction. | string | Example: "kiosk001" |
timestamp_expiryrequired | QR code expiry timestamp (UNIX epoch time in milliseconds) | string | Example: "1602324610000" |
timestamp_startrequired | QR code start timestamp (UNIX epoch time in milliseconds) | string | Example: "1570702210000" |
vrequired | Version of Verify API. | string | Default: 2 |
signaturerequired | Binary of the generated signature encoded in Base64 URL-safe format. This digital signature will be used to ensure non-repudiation of the request. | string | Example: "MEyCBY/XSBBB..." |
Generate QR code
Display QR code to the Client:
Generated QR code should correspond to the Singpass display guideline.
In the event that the Verify system is unavailable, the digital service should display an error indicator with the following error message:
<aside> ℹ️ Note:
We are unable to validate your identity through Verify.
Please contact [email protected] if you require additional assistance.
</aside>
Source: https://api.singpass.gov.sg/library/verify/developers/overview
Singpass Verify Integration is built on the OAuth 2.0 framework which is the web standard for obtaining user's authorization in order to access user-owned resources. The flow involves invocation of 3 APIs: authorize, token and person (resource API).
https://api.singpass.gov.sg/library/verify/developers/resources-error-codes