Integration Fields Sprout video Api

Hello,

We are trying to integrate Sprout Video rest api with integration fields and create posts with custom data.

  1. key issue we are facing is authentication.
    Authentication has SproutVideo-Api-Key header and api key.
    we tried multiple ways to connect, mostly authentication fails.

  2. For custom Api do they have to have exact format which Prismic needs or any Json format will work.

We are trying to turn all our videos into video post with various custom attributes and integrate into Gatsby.

Hope someone can help in here.

Sprout provides us with Json data attributes
“total”: 131,
“videos”: [
{
“id”: “”,
“width”:,
“height”:,
“embed_code”: “”,
“source_video_file_size”: 543196821,
“sd_video_file_size”: 0,
“hd_video_file_size”: 0,
“security_token”: “”,
“title”: “”,
“description”: “”,
“duration”: ,
“privacy”: ,
“password”: null,
“state”: “”,
“tags”: [
“ac9bdeb61e1222”,
“ee9bdeb6101560”
],
“created_at”: “2020-03-27T06:52:17-04:00”,
“updated_at”: “2020-06-11T02:45:41-04:00”,
“plays”: 9517,
“progress”: 100,
“requires_signed_embeds”: null,
“selected_poster_frame_number”:7,
“embedded_url”: null,
“assets”: {
“videos”: {
“1080p”: “”,
“2k”: null,
“4k”: null,
“8k”: null,
“source”: null
},
]
}

Hi Akash,

I’m not an expert with integration fields but it seems like you can do the same thing that my colleague Raphael explains how to do with the youtube API here:

You can pass the API key in an env var and pass the relevant fields to match our format for the JSON.

Thanks.

Thanks Phil,
We will try and build code based on the example.
Any further progress we will share the update.

Much appreciate the support.

Thanks

1 Like