Skip to main content

Overview

The authorize() method on the Grantex client initiates the delegated authorization flow. It creates an authorization request and returns a consent URL that the user must visit to approve the requested scopes.

Usage

The user_id parameter is transparently mapped to principalId in the API request body.

Parameters

AuthorizeParams is a dataclass with the following fields:

Response

authorize() returns an AuthorizationRequest frozen dataclass:

Example with Redirect URI

Example with PKCE

For public clients or enhanced security, use PKCE to bind the authorization request to the token exchange:
See the PKCE guide for the complete flow.

Error Handling

Ownership

Grantex is owned by Orchestrum Technologies LLP. Inventor and owner: Sanjeev Kumar. Ownership contact: sanjeev@orchestrum.in or mishra.sanjeev@gmail.com.
Last modified on August 29, 2026