Skip to content

Instantly share code, notes, and snippets.

@mzavyalov
Created December 19, 2020 07:12
Show Gist options
  • Save mzavyalov/a284d5183925c3bb1508e2e2231f4c87 to your computer and use it in GitHub Desktop.
Save mzavyalov/a284d5183925c3bb1508e2e2231f4c87 to your computer and use it in GitHub Desktop.
Yandex call Direct API
#!/usr/bin/env python3
import json
import requests
ENDPOINT = 'https://api.direct.yandex.com/json/v5/campaigns'
TOKEN = "YOUR TOKEN HERE"
headers = {
"Authorization": f"Bearer {TOKEN}",
"Accept-Language": "ru",
}
result = requests.post(ENDPOINT, headers=headers)
print(result.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment