+44 20 881 67284

38,368,216 Royalty Free Stock Photos

How to use the Fotolia API

Method: media/getMedia

This method allows to purchase a media and returns url to the purchased file.


This method requires authentication with a valid session token.

HTTP method

This method is called with HTTP method GET.


Argument Type Element (array) Valid Values Default Value Detail
id int existing media ID required Media ID (ID of the Media whose you want to purchase a license)
license_name string existing license name for this Media ID required Media license name

Returned Values

Element (path) Name Type Description
/ url string URL where you can download the purchased Media. This url must be kept hidden and is valid during 72 hours
/ name string the file name of this download following this patter: Fotolia_<media_id>_<license_name>.<extension>
/ extension string extension to use for this file. Can be "svg", "zip", "jpg", "avi", "mpg", "swf" or "mov"

Example Query

GET http://API_KEY:SESSION_TOKEN@api.fotolia.com/Rest/1/media/getMedia?id=20&license_name=M

Example Response


Error Codes

001: Service currently unavailable
The requested service is temporarily unavailable.
002: Failed to parse request
The request could not be parsed.
010: Missing API Key
The API key passed is missing.
011: Invalid API Key
The API key passed is not valid or has expired.
020: Missing Session Token
The session token passed is missing. A valid session token is needed to access this method
021: Invalid Session Token
The session token passed is not valid. Please login to get a valid session token.
031: Invalid Method
This method does not exist in the method list.
032: Method not Available
This method is not available for this API Key.
100: Missing Media ID
The media ID is missing. Media ID is required for this method.
101: Invalid Media ID
The media ID passed is not valid or doesn't correspond to any media.
2200: Missing License Name
The License Name is needed to purchase a media.
2201: Invalid License Name
The License Name passed is not valid, doesn't exist or is not available for this media
3000: Insufficent Credit Value
You don't have enough money on your account to purchase media
3099: Not enough download slots left
You don't have enough available downloads left on your subscription to download this media