B
B
BonBon Slick2017-03-08 23:10:46
API
BonBon Slick, 2017-03-08 23:10:46

Laravel 5.4 Vimeo API installation and configuration?

How to setup Vimeo API with Laravel 5.4? So that the user clicks the button to send the video and it sends?
No packages.

I'm already registered on Vimeo.com, and https://developer.vimeo.com/api/ too, I registered the application, I received a public-private token. It remains to configure Laravel as I understand it.
I also downloaded their PhP library, I don’t quite understand what to do with it.
I'll deal with sending, at the moment, when I click it, it gives me an error:

// кнопка ведет на юрл https://api.vimeo.com/me
{
    "error": "You must provide a valid authenticated access token."
}

Registered in services.php
'vimeo' => [
        'client_id' => env('VIMEO_CLIENT_ID'),
        'client_secret' => env('VIMEO_CLIENT_SECRET'),
        'access_token' => env('VIMEO_TOKEN'),
    ],

app.php
VIMEO_CLIENT_ID=client_id
VIMEO_CLIENT_SECRET=client_secret
VIMEO_TOKEN=my_app_generated_token

When registering APPlication, the site URL indicated localhost, as I do it from localhost.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
BonBon Slick, 2017-03-12
@BonBonSlick

Configuration steps:
1 - composer require vimeo/vimeo-api
2 - .env

VIMEO_CLIENT_ID=client_id
VIMEO_CLIENT_SECRET=client_secret
VIMEO_TOKEN=my_app_generated_token

3 - app.php
'vimeo' => [
        'client_id' => env('VIMEO_CLIENT_ID'),
        'client_secret' => env('VIMEO_CLIENT_SECRET'),
        'access_token' => env('VIMEO_TOKEN'),
    ],

4- Controller
$client_id = config('constants.vimeo.client_id');
        $client_secret = config('app.vimeo.client_secret');
        $access_token = config('app.vimeo.access_token');

        $vimeoModel = new \Vimeo\Vimeo($client_id, $client_secret, $access_token);

S
Sungat Arynov, 2017-03-09
@Ginkidayo

It is not clear which package, when you click what? It's hard to wang. Do you use this package
at least for Lara ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question