Skip to main content

Check Verification Code

Check the verification code that a user has provided. Use the request_id that was received when the verification code was sent.

Replace the following variables in the sample code with your own values:

KeyDescription
SENDLIME_API_KEYYour SendLime API key (see it on your dashboard).
SENDLIME_API_SECRETYour SendLime API secret (see it on your dashboard).
REQUEST_IDThe ID of the Verify request (this is returned in the API response when you send a verification code).
CODEThe verification code entered by your user.
info

HTTP requests to the API are protected with HTTP Basic authentication.

User your API Key as the username and your API Secret as the password for HTTP Basic authentication.

Write the code

Add the following to check-verification-code.sh:

curl -X "POST" "https://brain.sendlime.com/verify/check" \
-d "request_id=$REQUEST_ID" \
-d "code=$CODE" \
-u $SENDLIME_API_KEY:$SENDLIME_API_SECRET

Run your code

Save this file to your machine and run it:

sh check-verification-code.sh