Media Actions

All of these actions require the basic authorization parameters. If you are unsure of how these work, please read the authorization section of the API Documentation.

Uploading Media

Request Action: upload
Request URL: http://www.framesocket.com/api/media/upload.php

Additional Parameters (Beyond Authorization):

  • Media File (Required) : media
    • Must be properly formatted POST data - either an image or a video.
  • Title (Optional) : title
    • Text String - Limit 100 Characters
  • Description (Optional) : description
    • Text String - Limit 1000 Characters
  • Keywords (Optional) : keywords
    • Text String - Comma separated by keyword or phrase
    • Limit 10 keywords or phrases
    • Suggested - Under 63 characters including commas
  • Custom ID (Optional) : customid
    • Text String - Max Length 32 Characters
    • THIS IS CASE SENSITIVE
  • Callback URL (Optional) : callback
    • The API will redirect the client to this URL upon upload completion.
    • The following $_GET parameters will be appended to the URL:
    • - success
    • - error
    • - hash
    • Example Callback: http://yourdomain.com/upload-callback.php?success=1&hash=abc123def&error=

Response (Beyond Success, Error, and Warnings):

  • Media Object [ medias ] representing the uploaded data.

Querying Media

Request Action: query
Request URL: http://www.framesocket.com/api/media/query.php

Additional Parameters (Beyond Authorization):

If querying for a single media - include at least one:

  • Media Hash Code: hash
  • Custom ID: customid

If querying for multiple medias - include at least one:

  • OR Title Words : ortitlewords
    • Comma separated list of title words.
    • Returned media will have at least one of the title words.
  • AND Title Words : andtitlewords
    • Comma separated list of title words.
    • Returned media will have all of the title words.
  • OR Keywords : orkeywords
    • Comma separated list of title words.
    • Returned media will have at least one of the keywords.
  • AND Keywords : andkeywords
    • Comma separated list of title words.
    • Returned media will have all of the keywords.
  • Media Type : type
    • Must be a valid type, either "image" or "video".

Optional parameters to limit or organize result set:

  • Sort Order : sort
    • Must be a valid sorting option, either "newest" or "oldest" first.
  • Result Limit Count : limit
    • Must be a valid integer.

NOTE: If no parameters are specified, query will return ALL medias for this account.

Response (Beyond Success, Error, and Warnings):

  • Media Objects [ medias ] representing the returned medias.

Querying Media Images

Request Action: images
Request URL: http://www.framesocket.com/api/media/images.php

When FrameSocket's encoding system processes videos, it automatically generates 5 images from the video to be used as possible thumbnail/placeholder/preview images. This provides you the ability to look up all of the images that were created so that you can change the image via the media update command.

Additional Parameters (Beyond Authorization):

Include at least one:

  • Video Hash : hash
  • Custom ID : customid

Response (Beyond Success, Error, and Warnings):

  • Image Objects [ images ] representing the returned images.

Updating Media

Request Action: update
Request URL: http://www.framesocket.com/api/media/update.php

Note - If you specify a customid but no hash, the video will be queried based on customid. If you specify both a customid and hash, the video will have its Custom ID updated to customid.

Additional Parameters (Beyond Authorization):

Include at least one:

  • Video Hash : hash
  • Custom ID : customid

New Values to Update Media

  • Title : title
    • Text String - Limit 100 characters
  • Description : description
    • Text String - Limit 1000 characters
  • Keywords : keywords
    • Text String - Comma separated by keyword or phrase
    • Limit 10 keywords or phrases
    • Suggested - Under 63 characters including commas
  • Custom ID : customid
    • Text String - Max Length 32 Characters
    • THIS IS CASE SENSITIVE
  • Image Hash : imagehash
    • This needs to refer to an image already assigned to this media.

Response (Beyond Success, Error, and Warnings):

  • Media Object [ medias ] representing updated media.

Deactivating Media

Request Action: deactivate
Request URL: http://www.framesocket.com/api/media/deactivate.php

Additional Parameters (Beyond Authorization):

Include at least one:

  • Video Hash : hash
  • Custom ID : customid

Response (Beyond Success, Error, and Warnings):

  • Media Object [ medias ] representing updated media.

Activating Media

Request Action: activate
Request URL: http://www.framesocket.com/api/media/activate.php

Additional Parameters (Beyond Authorization):

Include at least one:

  • Video Hash : hash
  • Custom ID : customid

Response (Beyond Success, Error, and Warnings):

  • Media Object [ medias ] representing updated media.
Have a question? We are currently: