title: How to delete video from Vimeo account through vimeo api
body: <p>In my previous asked question <a href="https://stackoverflow.com/questions/15677794/vimeo-api-not-working-in-symfony-2-2">How to upload video in vimeo account through vimeo api in Symfony 2.2</a>   which is now closed . Now I have one more requirement that I want to delete the uploaded video from vimeo account through my application with help of vimeo api into which i used the </p>
  
  <blockquote>
    <p>"vimeo.videos.delete"   method
    as given below</p>
  </blockquote>
  
  <pre><code>/**
   * Deletes a Video entity.
   *
   * @Route("/{id}", name="video_delete")
   * @Method("DELETE")
   * @Secure(roles="ROLE_SUPER_ADMIN")
   */
  public function deleteAction(Request $request, $id)
  {
      $vimeo = new phpVimeo('my_api_key', 'my_api_key_secret', 'my_token', 'my_token_secret');
      $form = $this-&gt;createDeleteForm($id);
      $form-&gt;bind($request);
      $em = $this-&gt;getDoctrine()-&gt;getManager();
      $video = $em-&gt;getRepository('MyBundle:Video')-&gt;find($id);
  
          if (!$video) {
              throw $this-&gt;createNotFoundException('Unable to find Video entity.');
          }
      $videoId = $video-&gt;getVideoId();
  
      if ($form-&gt;isValid()) {
          try
          {
          $vimeo-&gt;call('vimeo.videos.delete',array('video_id',$videoId));
          $em-&gt;remove($video);
          $em-&gt;flush();
      }
      catch (VimeoAPIException $e) {
              echo "Encountered an API error -- code {$e-&gt;getCode()} - {$e-&gt;getMessage()}";
          }
      }
  
      return $this-&gt;redirect($this-&gt;generateUrl('video'));
      }
  }
  </code></pre>
  
  <p>But when i try to delete a selected video in my application , it try to delete the video but can't delete the video from vimeo account while from my database references infos of this video is deleted while i want to delete the video from the both database and vimeo account . I do't konow what wrong I m doing ? </p>
  
  <p>If any help regarding this issue is available to anyone , please help me to resolve this issue . </p>