如何生成Vimeo未经身份验证的访问令牌?

问题描述:

我是 Vimeo 的api的新手,我正在寻找一种提出未经身份验证的请求的方法.我发现我需要生成未经身份验证的访问令牌,但是我不需要在Vimeo的应用程序控制台中看不到任何执行此操作的选项.有人可以帮忙吗?

I am new to Vimeo's api, i am looking for a way to make unauthenticated requests. I find out that i will need to generate unauthenticated access token, but i don't see any option to do that in the Vimeo's apps console. Can anybody help?

该应用程序页面尚不支持手动构造未经身份验证的访问令牌(即将到来!).现在,您必须以编程方式请求它们.

The app page does not yet support manual construction of unauthenticated access tokens (it's coming!). For now you have to request them programmatically.

幸运的是,它们不会过期,因此您只需生成一次即可.这是有关如何生成此令牌的快速演练.

Luckily, they don't expire, so you only have to generate it once. Here's a quick walk-through on how to generate this token.

  1. 从您的应用页面中获取您的客户ID和机密.
  2. 将它们与中间的冒号一起猛击(例如abcd1234:edgh678)
  3. Base64对整个字符串进行编码(您可以在网上找到编码器,还有很多公共网站)
  4. 构造请求(您可以使用curl,浏览器工具或您喜欢的http请求工具).
    • HTTP方法: POST
    • HTTP URL: https://api.vimeo.com/oauth/authorize/client
    • HTTP标头:授权:基本的<您的base 64编码令牌>
    • 请求正文: grant_type = client_credentials& scope = public%20private
  1. Grab your client id and secret from your app page.
  2. Slam them together with a colon in the middle (eg abcd1234:edgh678)
  3. Base64 encode that whole string (you can find encoders online, plenty of public websites)
  4. Construct the request (you can use curl, a browser tool, or your favorite http request tool).
    • HTTP Method: POST
    • HTTP URL: https://api.vimeo.com/oauth/authorize/client
    • HTTP Headers: Authorization: basic <your base 64 encoded token>
    • Request Body: grant_type=client_credentials&scope=public%20private