Skip to content
Advertisement

Vimeo API: cannot delete because official SDK is using a wrong url

Environment

  • Debian 9
  • PHP 7.2
  • Vimeo package version in composer.json: “vimeo/vimeo-api”: “^3.0.2”
    • resolved as version 3.0.2

The goal

Given a vimeo content url, delete the video. For example: having a video https://vimeo.com/12345678 I want to delete the video with the id 12345678

What I am doing

1. Instanciate the php sdk api client

JavaScript

This configs are right, I’m using to upload videos and all works

2. Call the delete api endpoint

JavaScript

The exception

The last row of code is throwing an absurd exception:

JavaScript

The last row is litterally showed with url trunced, it’s not my fault on copy/pasting, but I think this demonstrate that something is wrong inside Vimeo SDK

Questions

  • Is it happening only to me?
  • Am I doing something wrong?
  • How can I circument this problem?

Side notes

I already opened an issue on Gihhub, without any official reply from sdk developers.

Advertisement

Answer

I succesfully traced the error to an error of mine

This is the incriminated snippet actually on github here

JavaScript

Dumping the $curl_url I see

JavaScript

Is is obviously wrong.

From official api doc about DELETE

REQUEST

DELETE https://api.vimeo.com/videos/{video_id}

So error is entirely mine

Wrong

JavaScript

Right

JavaScript

Sorry, Vimeo staff, it was my fault, not yours.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement