How can I control the token attributes?

This article deals mainly with the specification of parameters to control the life of the token. If you are interested in setting params to control the expiration date of the Vid.ly itself, please view the article that explains Vid.ly protection. These are two seperate controls that are offered via the Vid.ly PRO service. 

http://www.encoding.com/how_do_i_protect_my_vid.lys_with_the_pro_service

###

With AddMedia, AddMediaLite or UpdateMedia, you can specify the restrictions of the token:

http://api.vid.ly/#AddMedia

<?xml version="1.0"?>
<Query>
    <Action>AddMedia</Action>
    <UserID>[User ID]</UserID>
    <UserKey>[User key]</UserKey>
    <Notify>[Notify URL]</Notify>
    <Source>
        <SourceFile>[SourceFile1]</SourceFile>
        <CDN>[CDNType]</CDN>
        <HD>[HD]</HD>
        <Protect>
            <StartDate>2012-04-01 00:00:00</StartDate>
            <ExpirationDate>2012-05-01 00:00:00</ExpirationDate>
            <IpAddress>89.100.11.*,89.100.12.1-20,89.100.13.50</IpAddress>
            <Token/>
        </Protect>
    </Source>
</Query>

http://api.vid.ly/#UpdateMedia

** please note you don't have to specify a new <SourceFile> if you are just updating a URL. This would be for uploading a new source to an existing URL.

<?xml version="1.0"?>
<Query>
    <Action>UpdateMedia</Action>
    <UserID>[User ID]</UserID>
    <UserKey>[User key]</UserKey>
    <Notify>[Notify URL]</Notify>
    <Source>
        <MediaShortLink>[MediaShortLink]</MediaShortLink>
        <SourceFile>[SourceFile1]</SourceFile>
        <CDN>[CDNType]</CDN>
        <HD>[HD]</HD>
        <Protect>
            <StartDate>2012-04-01 00:00:00</StartDate>
            <ExpirationDate>2012-05-01 00:00:00</ExpirationDate>
            <IpAddress>89.100.11.*,89.100.12.1-20,89.100.13.50</IpAddress>
            <Token/>
        </Protect>
    </Source>
</Query>

URLs can be protected with these options (in any combination):

1) StartDate/ ExpirationDate
2) IpAddress
3) Token

If URL is protected with a token, you would need retrieve it with GetSecurityToken:

http://api.vid.ly/#GetSecurityToken
<?xml version="1.0"?>
<Query>
    <Action>GetSecurityToken</Action>
    <UserID>[User ID]</UserID>
    <UserKey>[User key]</UserKey>
    <MediaShortLink>[MediaShortLink]</MediaShortLink>
    <AllowedFromDate>2012-03-11 10:00:00</AllowedFromDate>
    <AllowedToDate>2012-03-12 10:00:00</AllowedToDate>
    <ExpirationTimeSeconds>86400</ExpirationTimeSeconds>
    <AllowedIP>192.168.1.1,192.168.1.50-100,192.168.2.*</AllowedIP>
</Query>

 

Token rules:

When you set IP/Time in <protect> tag with AddMedia or UpdateMedia – you protect Video with this.

When you set IP/Time in GetSecurityToken, you protect TOKEN with this. Translation: the token will only work if the restriction parameters are met.

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.00 out of 5)
Loading...

edchelp