Last updated
Last updated
If you use one of the supplied SDKs, there is no reason to use the code in the following section as the signature can be generated by calling the generate_signature function. The generated signature has to be passed as a string in your request.
To communicate with our system we require a signature on each request to ensure that both parties are who they say they are. To calculate your signature, you will need your partner ID
and API Key for Signature
, both of which are available on the .
Your partner ID: 085
String Value of your partner ID: "085"
Follow the steps below to generate your signature
Create a timestamp in an ISO date format
Update the function message with timestamp created in 1, your partner Id, and "sid_request" string
Base64 encode the encrypted hash
Example code for creating the signature
Reminder: You must pass the signature as a string in your request. Your timestamp should be a string in the ISO format "yyyy-MM-dd'T'HH:mm:ss.fffK"
To verify the authenticity of the response received from your callback as genuinely originating from Smile ID, you can confirm the returned signature and timestamp. The sample codes provided below can be used to confirm the signature in the request:
Example code for confirming the signature
Reminder: You must pass the received signature, received timestamp, partner id and api key as strings.
You can find and generate your an API key . The key is unique to each environment, so you will need a different key for the sandbox and production environments. You can rotate your API key any time, however your previous key will be immediately disabled.
You will need to know your partner ID, to create the signature. Your partner ID can be viewed when logged into the . To calculate your signature you will need to input your partner ID as a string, as explained below
Create a new hmac-sha256 hash function using .