@grabjs/superapp-sdk
    Preparing search index...

    Type Alias AuthorizeResponse

    AuthorizeResponse: BridgeResponse<
        200
        | 204
        | 302
        | 400
        | 401
        | 403
        | 500
        | 501,
        AuthorizeResult,
    >

    Response when initiating an authorization flow.

    This response can have the following status codes:

    • 200: Authorization completed successfully (native in_place flow). The result contains the authorization code and state.
    • 204: No content - user cancelled or flow completed without result data.
    • 302: Redirect in progress (web redirect flow). The page will navigate away.
    • 400: Bad request - missing required OAuth parameters or invalid configuration.
    • 401: Unauthorized - user not authenticated or session expired.
    • 403: Forbidden - client not authorized for the requested scope.
    • 500: Internal server error - unexpected error during native authorization.
    • 501: Not implemented - this method requires the Grab app environment.

    Success response (200) - native in_place flow:

    {
    status_code: 200,
    result: {
    code: 'auth-code-abc123',
    state: 'csrf-state-xyz789'
    }
    }

    Cancelled response (204):

    { status_code: 204 }
    

    Redirect response (302) - web flow:

    { status_code: 302 }
    

    Bad request response (400):

    {
    status_code: 400,
    error: 'Missing required OAuth parameters'
    }

    Unauthorized response (401):

    {
    status_code: 401,
    error: 'Unauthorized: User not authenticated or session expired'
    }

    Forbidden response (403):

    {
    status_code: 403,
    error: 'Forbidden: Client not authorized for the requested scope'
    }

    Internal server error response (500):

    {
    status_code: 500,
    error: 'Internal server error'
    }

    Not implemented response (501) - outside Grab app:

    {
    status_code: 501,
    error: 'Not implemented: This method requires the Grab app environment'
    }