Getty Images APIs enable seamless integration of Getty Images expansive content, powerful search and rich metadata directly into your internal workflows, products and services. With Connect’s API solutions, you can fully control, customize and scale as you grow. The Connect API uses JSON over HTTP POST to allow you to build applications capable of search and download on Getty Images using an active download agreement.
Register Getty images api and get api key for use to generate session. You can download Getty Images api code sample from https://github.com/gettyimages/connect/tree/master/code-samples.
First of all download zend library files from https://github.com/zendframework/zf1 and extract the folder where you can setup Getty Images API as /var/www/gt/ and follow the steps:
1. Include the Zend client file in generate session file.
$createSessionArray = array(
“RequestHeader” => array(
“Token” => “”,
“CoordinationId” => “”
),
“CreateSessionRequestBody” => array(
“SystemId” => $systemId,
“SystemPassword” => $systemPassword,
“UserName” => $userName,
“UserPassword” => $userPassword,
“RememberedUser” => “false”
)
); 4. Encode data to json (requires PHP 5.2 or greater, if using earlier use PEAR’s Service_JSON)
$json = json_encode($createSessionArray);
5. Create Zend_Http_Client, set JSON data and type, set method to POST
$httpClient = new Zend_Http_Client($endpoint);
$httpClient->setRawData($json, ‘application/json’);
$httpClient->setMethod(Zend_Http_Client::POST); // all getty api requests are POST
// create client and set json data and datatype
$httpClient = new Zend_Http_Client($endpoint);
$httpClient->setRawData($json, ‘application/json’);
$httpClient->setMethod(Zend_Http_Client::POST); // all getty api requests are POST
Technology is advancing at an unprecedented pace, reshaping industries and redefining the roles of professionals. As we approach 2025, staying ahead of the curve requires understanding emerging trends and their […]
As 2024 comes to a close, it’s the perfect time to reflect on the remarkable technological innovations that have shaped the year. From advancements in Artificial Intelligence (AI) to the […]
Learn how AI chatbots are transforming e-commerce by providing seamless customer support, automating tasks, and enhancing the shopping experience for users.