API calls with an access token
How to call an API
Example of getting a list of ad groups
- curl
curl -X GET 'https://openapi.naver.com/v1/ad-api/1.0/adAccounts/{AD_ACCOUNT_ID}/adSets/{AD_GROUP_ID}' \
-H 'Authorization: Bearer {ACCESS_TOKEN}'
- node.js - axios
var axios = require('axios');
var config = {
method: 'get',
url: 'https://openapi.naver.com/v1/ad-api/1.0/adAccounts/{AD_ACCOUNT_ID}/adSets/{AD_GROUP_ID}',
headers: {
'Authorization': 'Bearer {ACCESS_TOKEN}'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});