---
updatedAt: 2025-06-05T20:02:26.000Z
agentTools:
  projectIndex: https://dev.streamlabs.com/llms.txt
---

# Connecting to an account

In order to connect a user to your Application to allow you execute API calls on their behalf, you will need to go through the following steps.

## 1. User Approval

Starting on a page on your site, the user will be sent to the [/authorize](https://dev.streamlabs.com/docs/authorize) endpoint.

## 2. Application Connection

Once on the authorize page, the user will be prompted to connect their Streamlabs account to your application for API access to their account.

![2204](https://files.readme.io/be31d6d-streamlabs-app-authorize.png "streamlabs-app-authorize.png")

## 3. If Declined

The user will decide to approve access or to decline. Regardless of their selection, they will be sent back to the `redirect_uri` for your client along with an authorization `code` or an error. Authorization codes expire after 5 minutes and are of one time use only, so you should exchange them immediately for an access\_token and refresh\_token as outlined in the next step.

## 4. If Approved

If the user approved access, take the `code` parameter and use the /token endpoint to receive an `access_token` and `refresh_token`.