> ## Documentation Index
> Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create AuthSession - Result

> Get AuthSession creation result.



## OpenAPI

````yaml get /{workspaceId}/projects/{projectName}/auth-sessions/create/{operationId}/result
openapi: 3.1.0
info:
  title: Intuned Client
  version: 0.0.2
  description: Programmatically trigger automations, manage Jobs, and handle AuthSessions.
  termsOfService: https://intuned.ai/terms
  contact:
    email: founders@intunedhq.com
servers:
  - url: https://app.intuned.io/api/v1/workspace
    description: Base URL for Intuned API.
security:
  - api_key: []
tags:
  - name: projects.jobs
    description: Project Jobs API
  - name: projects.jobs.runs
    description: Project JobRuns API
  - name: projects.runs
    description: Run APIs
  - name: projects.authSessions
    description: Manage AuthSessions
  - name: projects.authSessions.validate
    description: Validate AuthSession
  - name: projects.authSessions.create
    description: Create AuthSession
  - name: projects.authSessions.update
    description: Update AuthSession
externalDocs:
  description: Find out more about Intuned
  url: https://intunedhq.com/docs/
paths:
  /{workspaceId}/projects/{projectName}/auth-sessions/create/{operationId}/result:
    get:
      tags:
        - projects.authSessions.create
      summary: Create AuthSession - Result
      description: Get AuthSession creation result.
      operationId: createAuthSessionResult
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          description: >-
            Your workspace ID. [How to find
            it](/main/03-how-to/manage/manage-workspace#how-to-get-your-workspace-id)?
          example: 123e4567-e89b-12d3-a456-426614174000
          in: path
          name: workspaceId
          x-speakeasy-globals-hidden: true
        - schema:
            type: string
          required: true
          description: The name you assigned when creating the Project.
          example: my-project
          in: path
          name: projectName
        - schema:
            type: string
          required: true
          description: The ID for the operation. This is obtained from the start request.
          example: aaaabbbCCCCdddd
          in: path
          name: operationId
      responses:
        '200':
          description: AuthSession creation result
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - done
                      authSessionId:
                        type: string
                        minLength: 3
                        pattern: ^[a-zA-Z0-9-(),_]+$
                        description: The unique identifier for the authentication session
                        example: auth-session-123
                    required:
                      - status
                      - authSessionId
                    title: Done
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - pending
                    required:
                      - status
                    title: Pending
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - canceled
                      message:
                        type: string
                      reason:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - auth-session-validate-dependency-failed
                              - terminated
                              - job-run-paused
                              - job-run-terminated
                              - failed-to-initialize-job-run
                              - api-access-disabled
                              - cancelled-user-action
                          message:
                            type: string
                          doc_url:
                            type: string
                            description: Optional URL to documentation for this error
                            example: >-
                              https://intunedhq.com/docs/main/support/reasons#terminated
                          details: {}
                        required:
                          - type
                          - message
                    required:
                      - status
                      - message
                      - reason
                    title: Canceled
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - in_progress
                      runId:
                        type: string
                        description: >-
                          Unique identifier for the run, prefixed nanoId
                          (ru_...)
                    required:
                      - status
                      - runId
                    title: In Progress
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - failed
                      message:
                        type: string
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                            description: Error message describing the failure
                            example: An error occurred while executing the run
                          code:
                            type: string
                            enum:
                              - internal-server-error
                              - script-process-crashed
                              - unexpected
                              - script-process-crashed
                              - script-execution-exception
                              - script-no-valid-output-received
                              - result-too-big-error
                              - script-timeout
                              - script-unexpected-error
                              - auth-check-failed
                              - all-attempts-failed
                              - check-attempts-failed
                              - create-attempts-failed
                              - post-create-check-attempts-failed
                              - api-attempts-failed
                              - onepassword-integration-error
                              - job-run-terminated
                            description: >-
                              Optional error code for more specific error
                              identification
                            example: script-process-crashed
                          category:
                            type: string
                            enum:
                              - infrastructure
                              - execution
                              - auth
                              - user
                              - billing
                          retirable:
                            type: boolean
                            default: false
                          doc_url:
                            type: string
                            description: Optional URL to documentation for this error
                            example: >-
                              https://intunedhq.com/docs/main/support/errors#run-execution-error
                          correlation_id:
                            type: string
                            description: >-
                              Optional correlation ID for tracing the error in
                              logs
                            example: 123e4567-e89b-12d3-a456-426614174000
                          details: {}
                        required:
                          - message
                          - category
                    required:
                      - status
                      - message
                      - error
                    title: Failed
              examples:
                done:
                  summary: Operation completed
                  value:
                    status: done
                    authSessionId: auth-session-123
                pending:
                  summary: Operation pending
                  value:
                    status: pending
      x-codeSamples:
        - lang: typescript
          label: createAuthSessionResult
          source: |
            import { IntunedClient } from "@intuned/client";

            const client = new IntunedClient({
              workspaceId: "123e4567-e89b-12d3-a456-426614174000",
              apiKey: process.env["INTUNED_API_KEY"] ?? "",
            });

            async function run() {
              const result = await client.projects.authSessions.create.result(
                "my-project",
                "aaaabbbCCCCdddd",
            );

              console.log(result);
            }

            run();
        - lang: python
          label: Python (SDK)
          source: |-
            from intuned_client import IntunedClient
            import os


            with IntunedClient(
                workspace_id="123e4567-e89b-12d3-a456-426614174000",
                api_key=os.getenv("INTUNED_API_KEY", ""),
            ) as client:

                res = client.projects.auth_sessions.create.result(
                    project_name="my-project",
                    operation_id="aaaabbbCCCCdddd",
                )

                print(res)
components:
  securitySchemes:
    api_key:
      type: apiKey
      description: >-
        API Key used to authenticate your requests. [How to create
        one](/main/03-how-to/manage/manage-api-keys).
      in: header
      name: x-api-key

````