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

# Connect

> Connect with the Linked Account's USPS account.

<Note>
  USPS is an **API Key** based integration and does not require the setup of an app by Refold user.
</Note>

### Required Credentials of a Linked Account

To successfully connect with the **USPS** integration, a Linked Account or an end-user will need to provide the following to connect:

1. Client ID
2. Client Secret

<Info>
  To understand how a Linked Account can get the above mentioned credentials, refer below.
</Info>

### Getting Credentials of USPS

To acquire the required credentials and connect a Linked Account, please follow the steps mentioned below:

<img height="200" src="https://mintcdn.com/cobalt-55/z_Cm6DgpvP5zfZT8/images/USPS/Usps_config.png?fit=max&auto=format&n=z_Cm6DgpvP5zfZT8&q=85&s=e6e840d012c34f8656be3b5ce82e747d" alt="Connect a Linked Account" data-path="images/USPS/Usps_config.png" />

1. Log in to your [USPS Developer account](https://developers.usps.com/).

<Note>
  Your users need to create a USPS Developer Account to acquire the required credentials.
</Note>

2. From the top navigation bar, click on `Apps` and then click on `Add App` button.

<img height="200" src="https://mintcdn.com/cobalt-55/z_Cm6DgpvP5zfZT8/images/USPS/Usps_navigation.png?fit=max&auto=format&n=z_Cm6DgpvP5zfZT8&q=85&s=995074bbf00e03fb29c3f059d223ae15" alt="Navigation in USPS" data-path="images/USPS/Usps_navigation.png" />

3. Provide an `App Name` > Select the `Public Access` checkbox and click on `Add App`.

<img height="200" src="https://mintcdn.com/cobalt-55/z_Cm6DgpvP5zfZT8/images/USPS/create_usps.png?fit=max&auto=format&n=z_Cm6DgpvP5zfZT8&q=85&s=8decb99fd90452f62aab5678863cb0d0" alt="Creating the app" data-path="images/USPS/create_usps.png" />

4. Once the app is created, click on it and copy the `Consumer Key`(Client ID) and `Consumer Secret`(Client Secret) for authentication.

<img height="200" src="https://mintcdn.com/cobalt-55/z_Cm6DgpvP5zfZT8/images/USPS/Usps_credentials.png?fit=max&auto=format&n=z_Cm6DgpvP5zfZT8&q=85&s=9e015dd205161aca4f8ef5a6e9f920a0" alt="Getting Credentials" data-path="images/USPS/Usps_credentials.png" />

The Linked Account or end-user now have all the credentials required to connect with USPS.

### Getting USPS API Access

To get access of APIs such as Tracking, you need to request USPS for approval.

You can request for the access by using the support form provided by USPS [here](https://emailus.usps.com/s/web-tools-inquiry).

#### Actions and triggers

In Refold, you can create orchestrations of your use-cases using USPS actions and triggers. Following are the set of USPS actions and triggers
supported by Refold.

<Tabs>
  <Tab title="Actions">
    <AccordionGroup>
      <Accordion title="Locations">
        1. **List Post Office Locations** - Find post office locations based on various criteria in USPS.
      </Accordion>

      <Accordion title="Subscriptions">
        2. **List Subscriptions** - List tracking subscriptions in USPS.
        3. **Create Subscription** - Create a new tracking subscription in USPS.
        4. **Get Subscription by ID** - Get details of a specific tracking subscription in USPS.
        5. **Update Subscription** - Update an existing tracking subscription in USPS.
        6. **Delete Subscription** - Delete an existing tracking subscription in USPS.
      </Accordion>

      <Accordion title="Tracking">
        7. **Get Tracking Details** - Get tracking details for a package in USPS.
        8. **Register for Tracking Notification** - Register for tracking notifications for a package in USPS.
      </Accordion>

      <Accordion title="Others">
        9. **HTTP Request** - Make HTTP API calls to any USPS documented REST APIs.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Triggers">
    There are no triggers in this application.
  </Tab>
</Tabs>
