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

# POST /admin/api/credential-login/authcode/start



## OpenAPI

````yaml /generated/openapi.json post /admin/api/credential-login/authcode/start
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /admin/api/credential-login/authcode/start:
    post:
      tags:
        - Management
      summary: POST /admin/api/credential-login/authcode/start
      parameters:
        - description: Administrative scope selected by the caller.
          in: header
          name: x-gproxy-admin-scope
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input_AuthCodeStart'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_AuthCodeStarted'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Input_AuthCodeStart:
      description: |-
        Begin a browser redirect login. The SDK mints the PKCE verifier and the
        CSRF state itself, so neither is a field here.
      properties:
        label:
          default: null
          description: >-
            The label for the credential this login will create. Absent derives
            one

            from the channel and whatever account the upstream names.
          type:
            - string
            - 'null'
        owner:
          $ref: '#/components/schemas/Input_CredentialOwner'
          default:
            organizationId: null
            teamId: null
            userId: null
        providerId:
          type: string
        redirectUri:
          default: null
          description: >-
            Where the upstream should send the person back. Absent lets the
            channel

            use the redirect it registered with the upstream itself, which is
            what

            a CLI-shaped channel needs.
          type:
            - string
            - 'null'
      required:
        - providerId
      type: object
    Output_AuthCodeStarted:
      properties:
        authorizeUrl:
          description: Where to send the person's browser.
          type: string
        loginSessionId:
          description: >-
            Names the pending session in every later step. It is not a secret,
            but

            whoever holds it can complete this login.
          type: string
        redirectUri:
          description: >-
            The redirect the channel actually asked for, which is what the
            callback

            will arrive at.
          type: string
      required:
        - loginSessionId
        - authorizeUrl
        - redirectUri
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Input_CredentialOwner:
      description: >-
        Who the credential belongs to, in the application layer's own
        vocabulary.

        Opaque to this crate: it copies the three columns through untouched, and

        only the layer above knows what an organization or a team is.
      properties:
        organizationId:
          default: null
          type:
            - string
            - 'null'
        teamId:
          default: null
          type:
            - string
            - 'null'
        userId:
          default: null
          type:
            - string
            - 'null'
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey
    consoleSession:
      in: cookie
      name: gproxy_session
      type: apiKey

````

## Related topics

- [POST /admin/api/credential-login/device/start](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredential-logindevicestart.md)
- [POST /admin/api/credential-login/authcode/complete](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredential-loginauthcodecomplete.md)
- [POST /admin/api/credential-login/device/poll](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredential-logindevicepoll.md)
- [POST /admin/api/credentials](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredentials.md)
- [POST /admin/api/credentials/{id}/quota-probe](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredentials-quota-probe.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.