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
  • Installation
Sample CodeOptions

Python

Was this page helpful?
Edit this page
Previous

PHP

Next
Built with

Version 1.0 Released March 25, 2022

View changelog View on Github

This is a sample seed Python Web App integrated with ID.me via OAuth 2.0

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

Prerequisites

In order to run the example, you must have python and pip installed

Installation

1

Download the code

2

Set your client configuration settings in server.py with the values provided in your developer account

1# server.py
2client_id = 'YOUR_CLIENT_ID'
3client_secret = 'YOUR_CLIENT_SECRET'
4redirect_uri = 'YOUR_REDIRECT_URI'
5authorization_base_url = 'https://api.id.me/oauth/authorize'
6token_url = 'https://api.id.me/oauth/token'
7attributes_url = 'https://api.id.me/api/public/v3/attributes.json'
8
9# possible scope values: "military", "student", "responder", "government", "teacher"
10scope = ['YOUR_SCOPE_VALUE']
3

Run the following to install the dependencies and start the server:

$pip install -r requirements.txt
$python server.py
4

View the app at http://localhost:5000