An executable code sample to demonstrate use of the Getty Images NodeJS SDK.
- Search for beach. Everyone likes a beach 🏖, right? (Well, except for this guy.)
- Get details for the first image that is returned.
- NodeJS - We recommend the current LTS release which at this time is 16.14.2
- Environment variables with API Key and Secret set
export GETTY_API_KEY=MYAPIKEY
export GETTY_API_SECRET=MYAPISECRET
SET GETTY_API_KEY=MYAPIKEY
SET GETTY_API_SECRET=MYAPISECRET
$env:GETTY_API_KEY=MYAPIKEY
$env:GETTY_API_SECRET=MYAPISECRET
See macOS/Linux
npm install
node index.js
You should see some JSON with information about a nice beach photo dumped out to your console.