AI-generated Key Takeaways
-
Existing Tenor integrations using the V1 API must migrate to V2 by updating API keys, domains, and endpoints.
-
V2 introduces changes to endpoints, parameters, and response objects, including sticker search and rebranded elements.
-
Developers should update their API calls to use
https://tenor.googleapis.com/v2/and ensure HTTPS support for content downloads. -
Notable endpoint changes include the removal of the Trending endpoint, renaming of GIF to Posts, and incorporating Random GIF into Search.
-
Response objects and errors have been updated, including renaming the GIF Object to Response Object and modifying the
mediafield tomedia_formats.
For existing integrations that use Tenor's V1 API, follow the steps on this page to migrate to V2.
Get a V2 API key
Follow the instructions in the setup step of the quickstart guide to get a V2 API key to replace your V1 version.
Update to V2 domains
Update your API domain to https://tenor.googleapis.com/v2/. Tenor's V2 API only
supports HTTPS connections. For content, be sure your application supports content downloads from
https://media.tenor.com and https://c.tenor.com.
For example, suppose you made an API call to one of the following V1 domains:
https://api.tenor.com/v1/search?<parameters>https://g.tenor.com/v1/search?<parameters>
To update the calls to V2, change them to
https://tenor.googleapis.com/v2/search?<parameters>.
Endpoint changes
The majority of API endpoint parameters are unchanged from what's documented in V1. There are a few notable exceptions:
- Tenor's Search endpoint
now supports sticker search through the
searchfilterparameter. - Include the
client_keyandcountryparameters on API calls. - The
media_filterparameter now takes a comma-separated list of the desired formats rather than preset enums. - The Categories endpoint now
supports
featuredandtrendingfor thetypeparameter. - The API no longer supports the
anon_idparameter. - When there are no more pages of results to request, the
nextfield of API responses is now a blank string rather than"0".
The following changes have been made to the endpoints available:
- The Trending endpoint is no longer supported. Instead, we recommend you use the Featured endpoint.
- The GIF endpoint has been rebranded as the Posts endpoint.
- The Random GIF endpoint has been incorporated into the
Search endpoint through the
randomparameter.
Response object and error changes
- The GIF Object has been rebranded to the Response Object.
- In the
Response
Object, the
mediafield has been rebranded asmedia_formats. The value formedia_formatsis now a map{ CONTENT_FORMAT : MEDIA_OBJECT }rather than an array of maps. - The content thumbnail previews have been moved from the
Media Object
for each
content
format to its own format. They're offered under the
media_formatsfield in the Response Object. - When there are no more results in a response object, the
nextfield is an empty string,"", rather than"0". - Tenor API error codes have been migrated to Google's standard API error codes.