question

steampunkjunkiesx avatar image
1 Like"
steampunkjunkiesx asked

Example of using API to create video?

Hi,


I was pleasantly surprised to hear that eBay is now letting us add videos for products on our listings. The email was a bit hit and miss though, and I can't figure out how to do it. Does anyone have an example code? The "overview" and example URL in their email doesn't work for me:


https://developer.ebay.com/api-docs/commerce/static/managing-video-media.html


(hangs and hangs, and eventually gives an error about SSL not being valid)


Thanks - I'm really looking forward to this! (we have been using videos on other marketplaces for ages, as its a great way to show off our unique products ;))


Cheers


Andy

ebay api api toolsvideos
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sagar_developersupport avatar image
1 Like"
sagar_developersupport answered

Hi @steampunkjunkiesx,

Media API gives a user, ability to create and upload videos. This video can be used to attach with a listing.
Ref: https://developer.ebay.com/api-docs/commerce/media/static/overview.html

This is a two step process:- First step is to execute createVideo to create a record for the video metadate like title, size, and classification of the video to be created.
Ref:https://developer.ebay.com/api-docs/commerce/media/resources/video/methods/createVideo

After the successful execution of createVideo call, you will get the Video ID in the location header under the response headers.- Second step is to execute UploadVideo call and after the successful execution, you will get the 200 status code in the response.
Ref: https://developer.ebay.com/api-docs/commerce/media/resources/video/methods/uploadVideo

Getting the video status:
- Users can use getVideo call with the videoID to get the current status of that videoID.
Ref: https://developer.ebay.com/api-docs/commerce/media/resources/video/methods/getVideo

How to use a videoID in a listing:- You can attach a VideoID to a listing as soon as you get the VideoID in the location header. There is no need to wait for processing to complete. If your video gets blocked after the processing Blocked, it will not be surfaced to Buyers.

Also, Buyer will only be able to see the video on eBay native apps. They will not be able to see the video on the web application even if a listing has a video.Sellers can use Item.VideoDetails.VideoID field for attaching a video to a listing.Ref: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/AddItem.html#Request.Item.VideoDetails

https://developer.ebay.com/Devzone/XML/docs/ReleaseNotes.html#1203-NF

Best Regards,
eBay Developer Support

· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you. Is there an example of this being done in PHP? I'm going to be using Perl, but would like to see how its done in PHP so I can try to adapt :) I use Net::eBay currently, but I have a feeling that won't work without some tweaks (sorry, I replied below but just realised that wasn't a "reply" to you!)

0 Likes 0 ·
steampunkjunkiesx avatar image
0 Likes"
steampunkjunkiesx answered

Does anyone actually have any example PHP code I can see? I'm trying to convert it into Perl :)


Thanks!

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.