Quick Start Guide
The authorization request, token exchange and userinfo call, end to end.
1. Authorization Request
Redirect users to the authorization endpoint with required parameters:
GET https://sandbox.truevault.com.au/oauth/oidc/authorize response_type=code &client_id=YOUR_CLIENT_ID &redirect_uri=https%3A%2F%2Fyour-app.com%2Fcallback &scope=openid+profile+email &state=RANDOM_STATE_VALUE &nonce=RANDOM_NONCE_VALUE &code_challenge=YOUR_CODE_CHALLENGE &code_challenge_method=S256 &claims=%7B%22true%22%3A%5B%22trueidentity.credential%22%2C%22trueidentity.given_name%22%2C%22trueidentity.family_name%22%2C%22trueidentity.birth_date%22%2C%22trueidentity.email%22%2C%22trueidentity.phone%22%2C%22trueidentity.email_verified%22%2C%22trueidentity.phone_verified%22%2C%22trueidentity.names_verified%22%2C%22document.passport.travel_document_number%22%2C%22document.passport_foreign.travel_document_number%22%2C%22document.driving_license.licence_number%22%5D%7D
Optionally add a ruleset parameter to request a specific ruleset. This ruleset must be in your client's allowed rulesets. If not specified, your client's default ruleset will be used.
&ruleset=acic|acicvevo|bronze|silver|gold|arnecc
To specify a custom ruleset, you may use a ruleset_id which will override any ruleset parameter.
Optionally pre-seed the person data with a phone and/or email.
&phone=432123456 &phone_country_code=61 &email=test@example.com
2. Handle Authorization Response
After user completes identity onboarding or sharing approval, they'll be redirected to your callback URL:
https://yourapp.com/callback?code=AUTH_CODE&state=RANDOM_STATE_VALUE
3. Exchange Code for Tokens
POST https://sandbox.truevault.com.au/oauth/oidc/token Content-Type: application/x-www-form-urlencoded grant_type=authorization_code &code=AUTH_CODE &client_id=YOUR_CLIENT_ID &client_secret=YOUR_CLIENT_SECRET &redirect_uri=https://yourapp.com/callback &code_verifier=ORIGINAL_CODE_VERIFIER
4. Access User Information
GET https://sandbox.truevault.com.au/oauth/oidc/userinfo Authorization: Bearer ACCESS_TOKEN