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

# Reconnect existing Connection

> This endpoint is used to reconnect an existing patient authorization with their healthcare provider's Patient Portal. 
It generates a state value and redirects the user to the Patient Portal for re-authentication with the provider's EHR system.
This endpoint is only required if the existing connection id has expired or been revoked.

Upon successful completion, Fasten Connect will redirect the user back to the specified `redirect_uri` with the `org_connection_id` and `endpoint_id` query parameters.

If an error occurs during the re-authentication process, the user will be redirected back with `error` and `error_description` query parameters providing details about the failure.

<Warning>
If multiple Redirect URLs are configured in the Fasten Connect Portal, you **MUST** include the `redirect_uri` query parameter in the request. This is automatically handled by the [Stitch SDK](stitch/v4/introduction) widget.
</Warning>

<Badge color="green">TEFCA</Badge> This endpoint CANNOT be used for TEFCA connections. TEFCA connections must be reconnected via the Stitch.js widget.


In `test` mode, you can use the following credentials to test the Fasten Stitch component:

<AccordionGroup>
  <Accordion icon="lock" title="Test Credentials">
    | Source                       | Credentials / Sandbox Status                                                                       | Link                                                                                                                                                  |
    | ---------------------------- | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
    | AdvancedMD                   | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | Aetna                        | Username: `VTETestUser01` <br />Password: `FHIRdemo2020`                                           | [test accounts](https://developerportal.aetna.com/sandbox_v2_test_member_logins_and_test_data_v2.1.xlsx)                                              |
    | AllScripts                   | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | Anthem                       | Username: `HOSPatient` <br />Password: `HOSPatient2023`                                            |                                                                                                                                                       |
    | AthenaHealth                 | Username: `phrtest_preview@mailinator.com` <br />Password: `Password1`                             | [test accounts](https://docs.athenahealth.com/api/guides/onboarding-overview)                                                                         |
    | CareEvolution                | Username: `CEPatient` <br />Password: `CEPatient2018`                                              | [test accounts](https://fhir.careevolution.com/TestPatientAccounts.html)                                                                              |
    | Cerner                       | Username: `nancysmart` <br />Password: `Cerner01`                                                  | [test accounts](https://docs.google.com/document/d/10RnVyF1etl_17pyCyK96tyhUWRbrTyEcqpwzW-Z-Ybs/edit)                                                 |
    | Cigna                        | Username: `syntheticuser05` <br />Password: `5ynthU5er5`                                           | [test accounts](https://developer.cigna.com/service-apis/patient-access/sandbox#How-to-Use-the-Sandbox-Sandbox-Test-Users)                            |
    | DynamicHealthIT              | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | eClinicalWorks/Healow        | Username: `AdultFemaleFHIR` <br />Password: `e@CWFHIR1`                                            | [test accounts](https://connect4.healow.com/apps/jsp/dev/r4/fhirClinicalDocumentation.jsp#SandboxTestingGuidelines)                                   |
    | Epic                         | Username: `fhircamila` <br />Password: `epicepic1`                                                 | [test accounts](https://fhir.epic.com/Documentation?docId=testpatients)                                                                               |
    | Flatiron/OncoEMR             | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | HealthIT                     | Username: `demouser` <br />Password: `Demouser1!`                                                  | [test accounts](https://fhirsandbox.healthit.gov/secure/r4/view/userlogin.html)                                                                       |
    | Humana                       | Username: `HUser00001` <br />Password: `PW00001!`                                                  |                                                                                                                                                       |
    | Kaiser                       | Username: `Pvaluser1` <br />Password: `V@lidation1`                                                |                                                                                                                                                       |
    | Logica                       | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | MaximEyes                    | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | Medhost                      | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | Medicare                     | Username: `BBUser00000` <br />Password: `PW00000!`                                                 | [test accounts](https://bluebutton.cms.gov/developers/#developer-guidelines)                                                                          |
    | Meditech                     | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | Netsmart                     | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | NextGen                      | Username: `patientapitest` <br />Password: `Password1!`                                            | [test accounts](https://www.nextgen.com/-/media/files/api/nge-patient-api-auth-guide.pdf)                                                             |
    | PracticeFusion/PatientFusion | Username: <br />Password:                                                                          |                                                                                                                                                       |
    | VA Health                    | Provider: ID.me<br />Username: `va.api.user+101-2024@gmail.com` <br />Password: `Password12345!!!` | [test accounts](https://developer.va.gov/explore/api/patient-health/test-users/3617/7058f75892b845dbbd3f371703cc066f398c336a87bb51d73128f1bac24e3105) |
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml GET /bridge/reconnect
openapi: 3.0.1
info:
  title: Fasten Connect
  description: >-
    Useful links:

    - [Fasten Connect API
    repository](https://github.com/fastenhealth/fasten-connect-api)

    - [Fasten Connect Developer
    Portal](https://github.com/fastenhealth/fasten-connect-app)
  termsOfService: https://www.fastenhealth.com/
  contact:
    email: connect@fastenhealth.com
  license:
    name: Private
  version: 1.0.11
servers:
  - url: https://api.connect.fastenhealth.com/v1/
    description: Use this server for both live and test mode.
security: []
tags:
  - name: auth
    description: Portal Authentication & Signup
  - name: user
    description: Operations about user
  - name: org
    description: Operations about organization
  - name: bridge
    description: Customer (organization) facing APIs
  - name: catalog
    description: Catalog APIs
externalDocs:
  description: Find out more about Fasten Connect
  url: https://www.fastenhealth.com/
paths:
  /bridge/reconnect:
    get:
      tags:
        - bridge
      description: >
        This endpoint is used to reconnect an existing patient authorization
        with their healthcare provider's Patient Portal. 

        It generates a state value and redirects the user to the Patient Portal
        for re-authentication with the provider's EHR system.

        This endpoint is only required if the existing connection id has expired
        or been revoked.


        Upon successful completion, Fasten Connect will redirect the user back
        to the specified `redirect_uri` with the `org_connection_id` and
        `endpoint_id` query parameters.


        If an error occurs during the re-authentication process, the user will
        be redirected back with `error` and `error_description` query parameters
        providing details about the failure.


        <Warning>

        If multiple Redirect URLs are configured in the Fasten Connect Portal,
        you **MUST** include the `redirect_uri` query parameter in the request.
        This is automatically handled by the [Stitch
        SDK](stitch/v4/introduction) widget.

        </Warning>


        <Badge color="green">TEFCA</Badge> This endpoint CANNOT be used for
        TEFCA connections. TEFCA connections must be reconnected via the
        Stitch.js widget.
      parameters:
        - name: public_id
          in: query
          description: Public Key for Organization Credential
          required: true
          schema:
            type: string
        - name: redirect_uri
          in: query
          description: >-
            Redirect URI (where the user will be redirected after
            authentication). Must match a `redirect_uri` provided in the Fasten
            Connect Portal.
          required: true
          example: https://www.example.com
          schema:
            type: string
            format: uri
        - name: reconnect_org_connection_id
          in: query
          description: Organization connection id, used for reconnecting existing patients
          required: true
          schema:
            type: string
        - name: external_id
          in: query
          description: >-
            An Opaque identifier, used to identify the patient in your system.
            This value will be returned in the Redirect URL response.
          required: false
          schema:
            type: string
        - name: external_state
          in: query
          description: >-
            An Opaque identifier, used to identify the connection request. This
            value should be unique. This value will be returned in the Redirect
            URL response.
          required: false
          schema:
            type: string
      responses:
        '302':
          description: Redirect
          headers:
            location:
              description: Setup state based redirect
              schema:
                oneOf:
                  - type: string
                    description: >-
                      If configuration is correct and valid for endpoint,
                      catalog, brand and public id, Fasten Connect will redirect
                      to given redirect url

````