Skip to main content

Generating Annotation Code/ Watermark

This is used to enter the annotation code. Please refer to the blog for details on writing the annotation code.

The annotation code below would show a dynamic watermark (moving text) displaying the name of the logged-in user.

{
"annotate":"[{'type':'rtext', 'text':' {name}', 'alpha':'0.60', 'color':'0xFF0000','size':'15','interval':'5000', 'skip': '5000'}]"
}
possible mistake

Notice that the annotate parameter needs extra serialisation. This is apart from the general POST body serialisation. This is the JSON.stringify() function in javascript, or the json_encode() function in PHP. Read the sample code below to see examples. Contact us at support@vdocipher.com if your watermark is not showing for you.

Get OTP Sample Code​

The sample videoID is 1234567890 and the API Secret Key is a1b2c3d4e5. This sample code only passes the annotation code as parameter.

curl -X POST \
https://dev.vdocipher.com/api/videos/1234567890/otp \
-H 'Accept: application/json' \
-H 'Authorization: Apisecret a1b2c3d4e5' \
-H 'Content-Type: application/json' \
-d '{
"annotate":"[{'\''type'\'':'\''rtext'\'', '\''text'\'':'\'' {name}'\'', '\''alpha'\'':'\''0.60'\'', '\''color'\'':'\''0xFF0000'\'','\''size'\'':'\''15'\'','\''interval'\'':'\''5000'\''}]"
}'