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

# Complete Password Provider MFA

> Create or submit link provider password complete mfa via the Junction API. Requires authentication with your team API key.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
       --url {{BASE_URL}}/v2/link/provider/password/{provider}/complete_mfa \
       --header 'Accept: application/json' \
       --header 'Content-Type: application/json' \
       --header 'x-vital-link-token: <VITAL-LINK-TOKEN>' \
       --data '
  {
       "mfa_code": "012345"
  }
  '
  ```

  ```typescript TypeScript theme={null}
  import { JunctionClient, JunctionEnvironment, PasswordProviders } from "@junction-api/sdk";

  const client = new JunctionClient({
      apiKey: "YOUR_API_KEY",
      environment: JunctionEnvironment.Sandbox,
  });

  const data = await client.link.completePasswordProviderMfa({
      provider: PasswordProviders.Whoop,
      mfaCode: "<mfa_code>",
  });
  ```

  ```python Python theme={null}
  from junction import Junction, PasswordProviders
  from junction.environment import JunctionEnvironment

  client = Junction(
      api_key="YOUR_API_KEY",
      environment=JunctionEnvironment.SANDBOX,
  )

  data = client.link.complete_password_provider_mfa(
      PasswordProviders.WHOOP,
      mfa_code="<mfa_code>",
  )
  ```

  ```java Java theme={null}
  import com.junction.api.Junction;
  import com.junction.api.core.Environment;
  import com.junction.api.resources.link.requests.CompletePasswordProviderMfaBody;
  import com.junction.api.types.PasswordProviders;

  Junction client = Junction.builder()
      .apiKey("YOUR_API_KEY")
      .environment(Environment.SANDBOX)
      .build();

  var data = client.link().completePasswordProviderMfa(
      PasswordProviders.WHOOP,
      CompletePasswordProviderMfaBody.builder()
          .mfaCode("<mfa_code>")
          .build()
  );
  ```

  ```go Go theme={null}
  import (
      "context"

      junction "github.com/junction-api/junction-go"
      "github.com/junction-api/junction-go/client"
      "github.com/junction-api/junction-go/option"
  )

  c := client.NewClient(
      option.WithApiKey("YOUR_API_KEY"),
      option.WithBaseURL(junction.Environments.Sandbox),
  )

  response, err := c.Link.CompletePasswordProviderMfa(context.TODO(), &junction.CompletePasswordProviderMfaBody{
      Provider: junction.PasswordProvidersWhoop,
      MfaCode:  "<mfa_code>",
  })
  if err != nil {
      return err
  }
  fmt.Printf("Received data %s\n", response)
  ```
</RequestExample>


## OpenAPI

````yaml POST /v2/link/provider/password/{provider}/complete_mfa
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.483
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v2/link/provider/password/{provider}/complete_mfa:
    post:
      tags:
        - link
      summary: Complete Password Provider Mfa
      description: This connects auth providers that are password based.
      operationId: >-
        complete_password_provider_mfa_v2_link_provider_password__provider__complete_mfa_post
      parameters:
        - name: provider
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/PasswordProviders'
            title: Providers that require password auth
        - name: x-vital-link-token
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Vital-Link-Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompletePasswordProviderMFABody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderLinkResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security: []
components:
  schemas:
    PasswordProviders:
      type: string
      enum:
        - whoop
        - renpho
        - peloton
        - zwift
        - eight_sleep
        - beurer_api
        - dexcom
        - hammerhead
        - my_fitness_pal
        - kardia
        - abbott_libreview
        - tandem_source
      title: PasswordProviders
      description: ℹ️ This enum is non-exhaustive.
    CompletePasswordProviderMFABody:
      properties:
        mfa_code:
          type: string
          title: Mfa Code
      type: object
      required:
        - mfa_code
      title: CompletePasswordProviderMFABody
    ProviderLinkResponse:
      properties:
        state:
          type: string
          enum:
            - success
            - error
            - pending_provider_mfa
          title: State
          description: ℹ️ This enum is non-exhaustive.
        redirect_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Redirect Url
          description: >-
            The redirect URL you supplied when creating the Link Token (via
            `POST /v2/link/token`).
        error_type:
          anyOf:
            - type: string
              enum:
                - invalid_token
                - token_expired
                - token_not_validated
                - token_consumed
                - provider_credential_error
                - provider_password_expired
                - provider_api_error
                - unsupported_region
                - duplicate_connection
                - required_scopes_not_granted
                - incorrect_mfa_code
                - user_cancelled
            - type: 'null'
          title: Error Type
          description: >-
            The Link Error Type. This field is populated only when state is
            `error`. ℹ️ This enum is non-exhaustive.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: >-
            A developer-readable debug description of the Link Error. This field
            is populated only when state is `error`.
        provider_mfa:
          anyOf:
            - $ref: '#/components/schemas/ProviderMFARequest'
            - type: 'null'
          description: >-
            The provider MFA request. This field is populated only when state is
            `pending_provider_mfa`.
        provider:
          $ref: '#/components/schemas/PasswordProviders'
          deprecated: true
          description: ℹ️ This enum is non-exhaustive.
        connected:
          type: boolean
          title: Connected
          deprecated: true
        provider_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Id
          deprecated: true
      type: object
      required:
        - state
        - provider
        - connected
        - provider_id
      title: ProviderLinkResponse
      example:
        state: success
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    ProviderMFARequest:
      properties:
        method:
          type: string
          enum:
            - sms
            - email
          title: Method
          description: >-
            The MFA method requested by the password provider to complete
            authentication. ℹ️ This enum is non-exhaustive.
        hint:
          type: string
          title: Hint
          description: >-
            The MFA hint provided by the password provider, e.g., the redacted
            phone number.
      type: object
      required:
        - method
        - hint
      title: ProviderMFARequest
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````