vimeo / VimeoNetworking

The Vimeo API iOS SDK
MIT License
84 stars 51 forks source link

Videos files nil. #426

Closed hiteshborse12 closed 3 years ago

hiteshborse12 commented 4 years ago

I want to play vimeo video. Using VimeoNetworking to get a video file URL. I am getting success callback but files are nil. Can you please help me with how can I fetch video file URL to play within the application?

My code to fetch videos(video id:209096387 ):

rpassis commented 4 years ago

Hi there,

A couple of things you may want to check:

1) Add .VideoFiles scope to your authentication request 2) Make sure you are authenticating with a PRO user account

Cheers, Rog

hiteshborse12 commented 4 years ago

@rpassis Thanks for the reply. I added the scope "VideoFiles". but still getting nill for files. Video URL: https://vimeo.com/464183390.

Updated code: func setupVimeoPlayer() { let appConfiguration = AppConfiguration(clientIdentifier: ".....",clientSecret: ".....",scopes: [.Private,.Public,.VideoFiles],keychainService: "nfromation") let vimeoSessionManager = VimeoSessionManager.defaultSessionManager(baseUrl: VimeoBaseURL,accessToken: ".....",apiVersion: "3.4") let vimeoClient = VimeoClient(appConfiguration: appConfiguration,sessionManager: vimeoSessionManager) let videoRequest = Request<VIMVideo>(path: "/videos/464183390") let mainthing = vimeoClient.request(videoRequest) {result in switch result { case .success(let response): let videos: [VIMVideo] = [response.model] print("\n\n retrieved videos: \(videos) \n\n") case .failure(let error): print("\n\n error retrieving videos: \(error) \n\n") } } }

code.txt

response.txt

rpassis commented 4 years ago

Hi @hiteshborse12,

Based on the response included above, I can see that the user you are authenticating with has a PLUS account. You will only be able to access your video files links with a PRO account (see https://vimeo.com/upgrade for details).

hiteshborse12 commented 4 years ago

Thanks. Will check with account owner :-)

hiteshborse12 commented 3 years ago

Hi @rpassis, I upgrade Vimeo account. Still, video files coming nil. Details: account: live_premium scopes: [.Public,.Interact,.Private,.VideoFiles] Video id: 464183390

Please @rpassis help ASAP to get video files. Attached code and response file. vimeoResponse.txt code.txt

hiteshborse12 commented 3 years ago

Fixed. Created new personal access token.