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
The year is 2025, and the landscape of software development is buzzing with innovation. Amidst this rapid evolution, one tool stands out as a true game-changer: GitHub Copilot. What started […]
Artificial Intelligence (AI) is no longer a futuristic concept. From chatbots answering customer queries to language models assisting developers with code generation, AI has firmly embedded itself in our digital […]
Choosing the right programming language can make all the difference — whether you’re building cutting-edge AI, launching a startup, or simply looking to future-proof your skills. The year 2025 has […]