> For the complete documentation index, see [llms.txt](https://make.inhale.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://make.inhale.tech/modules/youtube-upload-video.md).

# YouTube: Upload Video

Upload video to YouTube channel

The module requires Google OAuth 2.0 connection to get access token and pass it with [other parameters](#mappable-parameters) to upload a video using YouTube Data V3 API.

{% hint style="info" %}
**Note:** Video will be uploaded to the root channel of Google account, which you used to create OAuth 2.0 connection with.
{% endhint %}

Once uploading started, unique temporary *video uploading ID* is created, which is sent in [response ](#interface)with *status* field (generally equals "in process").

You can check video uploading status using the [YouTube: Get Video status](/modules/youtube-get-video-status.md) module.&#x20;

{% hint style="warning" %}
**Important note:** The uploading status, whish is accessible by the [YouTube: Get Video status](/modules/youtube-get-video-status.md) module, does not actually correspond to the YouTube video status, it only determines is the module processed a video thus transferred it correctly to YouTube or not.
{% endhint %}

If *webhook URL* is provided, server sends GET request (in **5** seconds delay from initial request started processing) to *webhook URL* with *youtubeLink* attached to the params of the URL once video processing finished.

{% hint style="info" %}
**Note:** *video uploading ID* will be deleted after **10** mins if the video was successfully transferred to YouTube.
{% endhint %}

## Parameters

#### **Video file URL**

Is a URL of video file, which will be uploaded to YouTube. Pay attention URL must lead to the file itself, not an html page, which contains the video.

{% code overflow="wrap" %}

```javascript
{
    Name: "videoUrl"
    Type: "text"
    Required: true
}
```

{% endcode %}

#### **Webhook URL**

Used as a callback URL. Server will send GET request to that URL after video processing finished.

{% code overflow="wrap" %}

```javascript
{
    Name: "webhookUrl"
    Type: "text"
    Required: false
}
```

{% endcode %}

#### Title

Video title

{% code fullWidth="false" %}

```javascript
{
    Name: "title"
    Type: "text"
    Required: true
}
```

{% endcode %}

#### Description

Vide description

{% code fullWidth="false" %}

```javascript
{
    Name: "description"
    Type: "text"
    Required: false
}
```

{% endcode %}

#### Tags

Tags must be a string containing tags separated with comma. Example: "tag1,tag2,tag3"

{% code fullWidth="false" %}

```javascript
{
    Name: "tags"
    Type: "text"
    Required: false
}
```

{% endcode %}

#### Playlist ID

To get playlist ID go to YouTube Studio and take the ID from URL: <https://studio.youtube.com/playlist/**\\>\<PLAYLIST\_ID>\*\*/videos

{% code fullWidth="false" %}

```javascript
{
    Name: "playlistId"
    Type: "text"
    Required: false
}
```

{% endcode %}

## Interface / Response body

#### Video uploading ID

Unique temporary ID, which you can use to get uploading video status using [YouTube: Get Video status](/modules/youtube-get-video-status.md) module.

{% code fullWidth="false" %}

```javascript
{
    Name: "uploadingID"
    Type: "text"
}
```

{% endcode %}

**Status**

Video uploading status. Could contain one of these values: "in process" / "error" / "processed".

{% hint style="warning" %}
**Important note:** The uploading status, whish is accessible by the [YouTube: Get Video status](/modules/youtube-get-video-status.md) module, does not actually correspond to the YouTube video status, it only determines is the module processed a video thus transferred it correctly to YouTube or not.
{% endhint %}

{% code fullWidth="false" %}

```javascript
{
    Name: "status"
    Type: "text"
}
```

{% endcode %}

## Errors

<table><thead><tr><th width="143">Status Code</th><th>Reasons</th></tr></thead><tbody><tr><td>400</td><td><ul><li>Validation error (title).</li><li>User exceeded max videos per day.</li><li>YouTube channel restrictions. For example, if user not verified he can not upload video longer 15 min: <a href="https://support.google.com/youtube/answer/71673?hl=en">https://support.google.com/youtube/answer/71673?hl=en</a></li></ul></td></tr><tr><td>403</td><td><ul><li>Google OAuth 2.0 client exceeded daily quota limit for uploading videos.</li></ul></td></tr><tr><td>500</td><td><ul><li>Internal Server error.</li></ul></td></tr></tbody></table>
