Merit documentation¶
merit.merit module¶
- class merit.merit.Merit(app_id: Optional[str] = None, app_secret: Optional[str] = None, production: bool = True)[source]¶
Bases:
objectHandler for basic non-Org-authenticated Merit API calls.
- Parameters
app_id – ID for the app, given during creation
app_secret – secret for the app, given during creation
production – specify the environment for your API calls
- Returns
Merit object
- get_org_id_from_token(org_id_token: str) → str[source]¶
Exchange org_id_token from link_with_merit flow for permanent org_id.
- Parameters
org_id_token – Org ID Token returned from
link_with_merit()flow- Returns
Org ID for the properly authenticated Org
- link_with_merit(success_url: str, failure_url: str) → str[source]¶
Initiate process to link Merit Org to this app.
- Parameters
success_url – relative path where Merit will redirect the user after successful authentication
failure_url – relative path where Merit will redirect the user after unsuccessful authentication
- Returns
URL to redirect user to to begin link_with_merit flow (https://app.merits.com/link-app/?token=5aa5a3992bfa4e0006c47cdf)