A simple Python GUI tool to assist with the OAuth2 authorization flow for Stellantis services (MyPeugeot, MyCitroën, MyDS, MyOpel and MyVauxhall).
This tool dynamically fetches the latest configuration from the Home Assistant Stellantis integration, and allows users to easily retrieve the OAuth2 authorization code without manual browser inspection.
- ✅ Automatically downloads the latest Stellantis brand/country configurations
- ✅ Supports multiple brands and locales
- ✅ Simple UI for selecting brand and country
- ✅ Embedded browser for authentication
- ✅ Automatically intercepts redirect and extracts the OAuth2
code
- ✅ One-click copy of the authorization code
- Python 3.7 or higher
- Required Python packages:
pip install PyQt5 PyQtWebEngine
git clone https://github.com/benbox69/stellantis-oauth-helper.git
cd stellantis-oauth-helper
python oauth_helper.py
- The application automatically downloads the
configs.json
file used by the Home Assistant Stellantis integration. - A graphical window opens where you select your brand (e.g., MyPeugeot) and country.
- Click Continue to launch the embedded browser.
- Log in using your Stellantis account.
- Once redirected, the application will:
- Intercept the redirect,
- Extract the OAuth2
code
, - Display the code in a popup window with a Copy button.
Once you have the code, you can:
- Use it with the Home Assistant Stellantis integration
- Or exchange it manually for an
access_token
/refresh_token
via Stellantis token endpoint (not yet included in this tool — coming soon)
- Exchange of
code
foraccess_token
andrefresh_token
- Option to save tokens to file
- Optional CLI/headless mode
MIT License