For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact UsSign In
HomeIntegrationsGuidesBrand Assets
HomeIntegrationsGuidesBrand Assets
  • Supported Applications
    • Overview
    • Shopify
    • Azure
  • Configurations
    • Overview
    • Configuration Standards
  • Deploy and Monitor
    • Overview
    • Quality Assurance Testing
    • Launching in Production
    • Monitoring Performance
    • Conversion Tracking
    • Help
  • Sample Code
    • Overview
      • Python
      • PHP
      • Ruby
      • Ruby on Rails
      • React Axios
      • JavaScript
      • jQuery
      • OIDC Ruby
  • Terms of Service
    • Developers
    • Partners
LogoLogo
Contact UsSign In
On this page
  • Prerequisites
  • Dependencies
  • Installation
Sample CodeOptions

JavaScript

Was this page helpful?
Edit this page
Previous

jQuery

Next
Built with

Version 1.0 Released October 13, 2021

View on GitHub

This is JavaScript sample code to make API requests with ID.me using OAuth 2.0

You will need an ID.me developer account to complete this process

Prerequisites

1

You must include jquery and ID.me’s javascript dependencies in your application

2

You must have node installed

Dependencies

jQuery

1<script type="text/javascript" src="https://code.jquery.com/jquery-3.7.1.min.js"></script>

ID.me

1<script src="https://s3.amazonaws.com/idme/developer/idme-buttons-2.0.1/assets/js/idme-modal.min.js" type="text/javascript"></script>

Installation

1

Log in to your ID.me developer account and follow the prompts to use the button generator

2

Set your client configuration settings in idme.js with the values provided within your developer account

1data-scope = 'SCOPE'
2// possible scope values: "military", "student", "responder", "government", "teacher"
3
4data-client-id = 'YOUR_CLIENT_ID'
5data-redirect = `YOUR_REDIRECT_URI`
6data-response = `RESPONSE`
7// possible values: "code", "token"
8
9data-op = `OP`
10// possible values: "signin", "signup"
11
12data-text = `OFFER_DESCRIPTION_TEXT`
13data-display = 'DISPLAY'
14// possible values: "popup", "link"
15
16data-show-verify = 'SHOW'
17// possible values: "true", "false"
3

Run the following within the directory of the sample code:

$npm install -g serve
$serve -p 3000
4

View the app at http://localhost:3000