Selfie Passback
Selfie Passback is currently in preview and is not generally available. To request access, reach out to your solutions consultant.
Selfie Passback lets your organization retrieve the selfie a member took during ID.me identity verification. It uses the same two-token exchange as Document Passback and the same Document endpoint, so if you already retrieve document images you only need to read one additional attribute and use one additional API token.
Use a selfie when you need to see the member’s face as it looked at verification, rather than the photo printed on an identity document.
A selfie is a biometric image. Access is enabled per consumer by your ID.me account team, and your organization is responsible for how it stores and uses the image. Return only what you need, and do not log image data.
Environments
Prerequisites
Before using Selfie Passback:
- Selfie Passback must be enabled on your consumer by your ID.me account team, which adds the
selfie_tokensattribute to your policy - You must have an API token with the selfie kind, provisioned by your ID.me account team. A document API token cannot retrieve a selfie
- Your integration must already obtain an access token and call the attributes endpoint
If you already use Document Passback, you will hold a separate document API token. Keep both. Each token only works with its own kind of image.
How it works
Retrieving a selfie requires two values obtained from separate sources:
- A selfie token, returned dynamically from the attributes endpoint for each verified session
- A selfie API token, a static token provisioned for your consumer by your ID.me account team
Get selfie tokens from the attributes endpoint
Call the attributes endpoint with a valid access token:
When selfie_tokens is enabled on your consumer and a selfie is available for the member, the response includes a token for each available selfie:
Only the keys that are available for the member are returned. Your integration must not assume both are present.
Repeat calls to the attributes endpoint can return a token you already hold, including one created by a token refresh. Any token you receive stays valid until it is redeemed or expires.
When a selfie is available
ID.me returns a selfie token only when the member’s identity verification included a successful face match between the selfie and the identity document. If the member did not complete that step, or their selfie is no longer retained, the corresponding key is absent from selfie_tokens. If neither is available, selfie_tokens is returned with a null value.
Build your integration so that a missing selfie is a normal outcome, with a fallback path such as the identity document image or your own manual review.
Token behavior
Selfie tokens follow the same rules as document tokens.
A token is not consumed when a request fails validation or when ID.me cannot produce the image, so you can retry the same token after correcting the request.
Token refresh
If you need the selfie again but have not made a new call to the attributes endpoint, use the Token Refresh endpoint to generate a new token without requiring a new user session.
Example response:
Use the returned token to call the Document endpoint as normal. The new token is for the same selfie as the one you refreshed. Refreshing does not invalidate the original token, which stays valid until it expires or is redeemed.
A token that has already been redeemed cannot be refreshed, and an expired token cannot be refreshed. Both return an error. To retrieve a selfie after that point, call the attributes endpoint again.
Dynamic image sizing
Pass a size parameter to resize the returned image:
If no size parameter is provided, the image is returned at its original resolution.
Aspect ratio
ID.me scales the image to fit within the requested width and height, preserving the original aspect ratio. For example, requesting 300x300 on a 480x640 image returns 225x300.
You can also pass a single integer, such as size=300. This sets the image width, and the height follows the original aspect ratio.
Size bounds
The larger of the two requested dimensions must fall within the bounds below.
A size that is not a single integer or in WIDTHxHEIGHT form, or whose larger value is outside these bounds, returns error code 132. ID.me does not fall back to the original image.
Image metadata
Images returned by the Document endpoint have embedded metadata (EXIF, IPTC and XMP), including any GPS location, removed. Both sized and unsized responses are processed this way, so the file you receive may differ in bytes and file size from the image originally captured.
Rate limiting
The Document endpoint is rate-limited to 2 requests per document. Once you reach the limit, requests are rejected until 60 seconds have passed since your last request, so a rejected request restarts the wait. The limit is counted per consumer and document, and is shared by every token issued for that document. Refreshing a token does not reset the limit, and refresh requests count toward it.
Errors
Errors, other than 500, are returned as JSON with a code and a message.