You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: The official api.video Swift video uploader for api.video. [api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
5
-
---
6
-
7
-
# api.video Swift video uploader
8
-
9
-
[api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
10
-
11
-
## Project description
12
-
13
-
api.video's Swift uploader uploads videos using delegated upload token or API Key.
[api.video](https://api.video) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
// If you rather like to upload with your "YOUR_API_KEY" (upload)
49
-
// ApiVideoUploader.apiKey = "YOUR_API_KEY"
50
-
51
-
try VideosAPI.uploadWithUploadToken(token: "MY_VIDEO_TOKEN", file: url) { video, error in
52
-
iflet video = video {
53
-
// Manage upload with upload token success here
54
-
}
55
-
iflet error = error {
56
-
// Manage upload with upload token error here
57
-
}
62
+
try VideosAPI.uploadWithUploadToken(token: "MY_VIDEO_TOKEN", file: url) { video, error in
63
+
iflet video = video {
64
+
// Manage upload with upload token success here
58
65
}
59
-
66
+
iflet error = error {
67
+
// Manage upload with upload token error here
68
+
}
69
+
}
60
70
```
61
71
62
-
##Documentation
72
+
# Documentation
63
73
64
-
###API Endpoints
74
+
## API Endpoints
65
75
66
76
All URIs are relative to *https://ws.api.video*
67
77
@@ -78,47 +88,47 @@ VideosAPI
78
88
79
89
Method | HTTP request | Description
80
90
------------- | ------------- | -------------
81
-
[**upload**](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideosAPI.md#upload) | **POST** /videos/{videoId}/source | Upload a video
82
-
[**uploadWithUploadToken**](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideosAPI.md#uploadWithUploadToken) | **POST** /upload | Upload with an delegated upload token
91
+
[**upload**](docs/VideosAPI.md#upload) | **POST** /videos/{videoId}/source | Upload a video
92
+
[**uploadWithUploadToken**](docs/VideosAPI.md#uploadWithUploadToken) | **POST** /upload | Upload with an delegated upload token
Most endpoints required to be authenticated using the API key mechanism described in our [documentation](https://docs.api.video/reference#authentication).
107
-
The access token generation mechanism is automatically handled by the client. All you have to do is provide an API key:
108
-
```swift
109
-
ApiVideoUploader.apiKey= YOUR_API_KEY
110
-
```
117
+
118
+
You must NOT store your API key in your application code to prevent your API key from being exposed in your source code.
119
+
Only the [Public endpoints](#public-endpoints) can be called without authentication.
120
+
In the case, you want to call an endpoint that requires authentication, you will have to use a backend server. See [Security best practices](https://docs.api.video/sdks/security) for more details.
111
121
112
122
### Public endpoints
113
123
114
-
Some endpoints don't require authentication. These one can be called without setting `ApiVideoUploader.apiKey`:
124
+
Some endpoints don't require authentication. These one can be called without setting `ApiVideoUploader.apiKey`.
115
125
116
126
## Have you gotten use from this API client?
117
127
118
128
Please take a moment to leave a star on the client ⭐
119
129
120
130
This helps other users to find the clients and also helps us understand which clients are most popular. Thank you!
121
131
122
-
##Contribution
132
+
# Contribution
123
133
124
-
Since this API client is generated from an OpenAPI description, we cannot accept pull requests made directly to the repository. If you want to contribute, you can open a pull request on the repository of our [client generator](https://github.com/apivideo/api-client-generator). Otherwise, you can also simply open an issue detailing your need on this repository.
134
+
Since this API client is generated from an OpenAPI description, we cannot accept pull requests made directly to the repository. If you want to contribute, you can open a pull request on the repository of our [client generator](https://github.com/apivideo/api-client-generator). Otherwise, you can also simply open an issue detailing your need on this repository.
0 commit comments