vimeo / vimeo.py

Official Python library for the Vimeo API.
https://developer.vimeo.com
Apache License 2.0
210 stars 84 forks source link

vimeo.auth.GrantFailed #113

Closed rbhutani closed 6 years ago

rbhutani commented 6 years ago

Hi,

I am testing out python to upload videos to Vimeo and I am new to both python and using APIs. I have already created an app on video and had requested the upload access and it was approved as well.

PyVimeo Version: 0.4.1 Python Version: 2.7.11 Mac OS Sierra V 10.12.6

`import vimeo
app_token='TOKEN GENERATED FROM VIMEO DEV SITE'
app_id = 'Client ID from Vimeo'
secret = 'app secret from Vimeo'
v = vimeo.VimeoClient(token= app_token,key=app_token,secret=app_secret)
token = v.load_client_credentials()

about_me = v.get('/me')
print (about_me.json())

videofilename= "/users/rohitbhutani/Desktop/Friends.avi"
video_uri = v.upload(videofilename)

I am getting this error:

Traceback (most recent call last): File "/Users/rohitbhutani/Documents/Test2.py", line 7, in <module> token = v.load_client_credentials() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vimeo/auth/client_credentials.py", line 23, in load_client_credentials raise GrantFailed() vimeo.auth.GrantFailed [Finished in 1.4s with exit code 1] [shell_cmd: python -u "/Users/rohitbhutani/Documents/Test2.py"] [dir: /Users/rohitbhutani/Documents] [path: /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin]

Looking for some beginner level help :) Thanks !

erunion commented 6 years ago

You appear to be sending your app_token twice.

Change key=app_token to key=app_id.

rbhutani commented 6 years ago

Sorry that was a typo in my last change.

Here is what I get after changing it: {u'error': u'You must provide a valid authenticated access token.'} Traceback (most recent call last): File "/Users/rohitbhutani/Documents/Test2.py", line 16, in <module> video_uri = v.upload(videofilename) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vimeo/upload.py", line 32, in upload return self._perform_upload(filename, ticket) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vimeo/upload.py", line 50, in _perform_upload ticket, "Failed to create an upload ticket") vimeo.exceptions.UploadTicketCreationFailure: Unable to upload video. Please get in touch with the app's creator. [Finished in 3.5s]

erunion commented 6 years ago

Can you send in an email to our support team at https://vimeo.com/help/contact? They'll be able to help you out.