Python

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