Code Snippet
The following code snippet can be used to add the ID.me button widget to your app. This widget only supports a full page redirect to the authorization endpoint.
<span
id="idme-wallet-button"
data-scope="military,responder,student,teacher,government"
data-client-id="[YOUR_CLIENT_ID]"
data-redirect="[YOUR_REDIRECT_URI]"
data-response="code"
data-text="[AFFINITY GROUP] receives [OFFER] with ID.me"
data-show-verify="true">
</span>
<script src="https://s3.amazonaws.com/idme/developer/idme-buttons/assets/js/idme-wallet-button.js"></script>
Parameters
These parameters establish both necessary and adaptable configurations, empowering customers to align with ID.me brand guidelines, utilize the appropriate button for specific scenarios, and guide users seamlessly through subsequent steps.
Parameter | Values | Description | Required |
---|---|---|---|
data-scope |
military,responder,student,teacher,government
|
Defines the community you are requesting permission to access. | Required |
data-client-id |
[YOUR_CLIENT_ID]
|
The client identifier received during app registration. It is automatically generated and can be found in your application dashboard. | Required |
data-redirect |
[YOUR_REDIRECT_URI]
|
The url the user gets redirected to after authorizing an app. Set by the developer within the application dashboard. | Required |
data-response |
code
or
token
|
The OAuth 2.0 grant type - Authorization Code
(code )
or Implicit
(token ).
|
Required |
data-text |
Example:
Military members receive 10% off with ID.me
|
A recommended parameter that displays a custom offer description within the ID.me Button Widget. |
Required if
data-type="link"
|
data-logo |
[YOUR_LOGO_URL]
|
A recommended parameter that displays a logo at the community selection page. | Optional |
data-hero |
[YOUR_HERO_IMAGE_URL]
|
A recommended parameter that displays a hero image at the community selection page. | Optional |
data-state |
Example:
24730b6d
|
A parameter to carry through any server-specific state you need to protect against CSRF issues. | Optional |
data-display |
popup
or
fullpage
|
A recommended parameter that determines to user experience. Defaults to
fullpage .
|
Optional |
data-show-verify |
true
or
false
|
Displays the "Verification by ID.me" text. Defaults to
false .
|
Optional |
data-app-id |
Example:
SC529724439d8558619035353581
|
An Application Identifier, used to denote a unique application on the partner side | Optional |