Build something great. Vimeo's API supports flexible, high-quality video integration with your custom apps.
The SDK requires Go version 1.18 or above.
Resolve all the SDK dependencies, using the go get command.
The following section explains how to use the vimeoApi library in a new project.
- Add the following lines to your application's
go.modfile:
replace vimeoApi => ".\\vimeo-api-go_generic_lib" // local path to the SDK
require vimeoApi v0.0.0- Resolve the dependencies in the updated
go.modfile, using thego getcommand.
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
|---|---|---|
| httpConfiguration | HttpConfiguration |
Configurable http client options like timeout and retries. |
| loggerConfiguration | LoggerConfiguration |
Represents the logger configurations for API calls |
| bearerCredentials | BearerCredentials |
The Credentials Setter for OAuth 2 Bearer token |
| oauth2AuthorizationCodeCredentials | Oauth2AuthorizationCodeCredentials |
The Credentials Setter for OAuth 2 Authorization Code Grant |
| oauth2ClientCredentialsCredentials | Oauth2ClientCredentialsCredentials |
The Credentials Setter for OAuth 2 Client Credentials Grant |
The API client can be initialized as follows:
package main
import (
"vimeoApi"
"vimeoApi/models"
)
func main() {
client := vimeoApi.NewClient(
vimeoApi.CreateConfiguration(
vimeoApi.WithHttpConfiguration(
vimeoApi.CreateHttpConfiguration(
vimeoApi.WithTimeout(30),
),
),
vimeoApi.WithBearerCredentials(
vimeoApi.NewBearerCredentials("AccessToken"),
),
vimeoApi.WithOauth2AuthorizationCodeCredentials(
vimeoApi.NewOauth2AuthorizationCodeCredentials(
"OAuthClientId",
"OAuthClientSecret",
"OAuthRedirectUri",
).
WithOauthScopes([]models.OauthScopeOauth2AuthorizationCode{
models.OauthScopeOauth2AuthorizationCode_Ai,
models.OauthScopeOauth2AuthorizationCode_Create,
}),
),
vimeoApi.WithOauth2ClientCredentialsCredentials(
vimeoApi.NewOauth2ClientCredentialsCredentials(
"OAuthClientId",
"OAuthClientSecret",
).
WithOauthScopes([]models.OauthScopeOauth2ClientCredentials{
models.OauthScopeOauth2ClientCredentials_Ai,
models.OauthScopeOauth2ClientCredentials_Create,
}),
),
vimeoApi.WithLoggerConfiguration(
vimeoApi.WithLevel("info"),
vimeoApi.WithRequestConfiguration(
vimeoApi.WithRequestBody(true),
),
vimeoApi.WithResponseConfiguration(
vimeoApi.WithResponseHeaders(true),
),
),
),
)
}This API uses the following authentication schemes.
bearer (OAuth 2 Bearer token)oauth2_authorization_code (OAuth 2 Authorization Code Grant)oauth2_client_credentials (OAuth 2 Client Credentials Grant)
- API Apps Webhooks
- API Information Essentials
- Authentication Extras Authenticate
- Authentication Extras Convert
- Authentication Extras Essentials
- Authentication Extras Exchange
- Channels Privatechannelmembers
- Channels Subscriptionsandsubscribers
- Embed Presets Customlogos
- Embed Presets Essentials
- Embed Presets Folders
- Embed Presets Timelineevents
- Embed Presets Videos
- Live Audiotracks
- Live Embedprivacy
- Live Event M3 U8 Playback
- Live Eventactivation
- Live Eventautomatedclosedcaptions
- Live Eventdestinations
- Live Eventend
- Live Eventlowlatency
- Live Eventsessions
- Live Eventthumbnails
- Live Eventvideos
- On Demand Backgrounds
- On Demand Essentials
- On Demand Genres
- On Demand Posters
- On Demand Promotions
- On Demand Purchasesandrentals
- On Demand Regions
- On Demand Seasons
- On Demand Videos
- Showcases Customshowcaselogos
- Showcases Customshowcasethumbnails
- Showcases Showcasevideos
- Subscription Plans Essentials
- Users Watchhistory
- Videos Animatedthumbnails
- Videos Contentratings
- Videos Creative Commons
- Videos Embedprivacy
- Videos Live M3 U8 Playback
- Videos Nondestructivetrimming
- Videos Texttracks
- Videos Unlistedvideos
- Videos Videocomments
- Watch Later Queue Essentials
- Categories Channels
- Categories Essentials
- Categories Groups
- Categories Users
- Categories Videos
- Channels Categories
- Channels Essentials
- Channels Moderators
- Channels Tags
- Channels Videos
- Folders Essentials
- Folders Items
- Folders Videos
- Groups Essentials
- Groups Subscriptions
- Groups Users
- Groups Videos
- Likes Essentials
- Live Analytics
- Live Essentials
- Live Graphics
- Live Scenes
- Payments Essentials
- Portfolios Essentials
- Portfolios Videos
- Search Federated
- Showcases Essentials
- Tags Essentials
- Teams Essentials
- Teams Members
- Tutorial Essentials
- Users Analytics
- Users Essentials
- Users Feeds
- Users Followers
- Users LMS
- Users Pictures
- Users Search
- Videos AI
- Videos Chapters
- Videos Credits
- Videos Essentials
- Videos Fragments
- Videos Languages
- Videos Moderation
- Videos Recommendations
- Videos Showcases
- Videos Tags
- Videos Thumbnails
- Videos Transcripts
- Videos Uploads
- Videos Versions