The Trendexplorer uses the OAuth 2.0 protocol for authentication and authorization. Currently only the two legged client credential authorization flow is supported. We will show you the basic usage on this page. However, if you need further information there are various resources on the internet that cover this, like here
In order to request an access token you will need client credentials (consisting of client id and client secret). If you have not received your client credentials yet, please get in touch with your contact at TRENDONE.
The endpoint to request an access token is: https://api.trendexplorer.com/oauth/v2/token
Given that you client id is myclientid and your client secret is
mysecret a valid call would look like this:
https://api.trendexplorer.com/oauth/v2/token?grant_type=client_credentials&client_id=myclientid&client_secret=mysecret
A response could be:
{"access_token":"myaccesstoken","expires_in":3600,"token_type":"bearer","scope":null}
Please note that access tokens have a limited lifetime (see the expires_in value). If your token has been expired your request to the API will be declined. You then have to obtain a new token.
After you obtained an access token you can send requests to the API. The access token has to be a query string parameter with the name access_token.
Example request:
https://api.trendexplorer.com/v1.0/?access_token=myaccesstoken
The Trendexplorer API can respond with JSON or XML (default is JSON). To force a format you have to provide the _format query string parameter with either json or xml.
JSON:
https://api.trendexplorer.com/v1.0/?access_token=myaccesstoken
XML:
https://api.trendexplorer.com/v1.0/?access_token=myaccesstoken&_format=xml
In the resources section below you can find a list of all resources the Trendexplorer API offers. You can expand each resource to see the description and perform requests using the sandbox. This allows you to explore the API without writing a single line of code. In order to use the sandbox you have to paste your access token in the access token field below and save it.