All below applies to python 3.7.1 and Windows

I use twitter-ads-v2 python module from twitter-ads-v2 in attempt to connect and consume various data points from ads-api (like campaign, line_items, metrics, etc).

import twitter_ads_v2

CONSUMER_KEY = ‘consumer key’
CONSUMER_SECRET = ‘consumer secret’
ACCESS_TOKEN = ‘access token’
ACCESS_TOKEN_SECRET = ‘access token secret’
ACCOUNT_ID = ‘account id’

client = twitter_ads_v2.Client(
ACCOUNT_ID,
CONSUMER_KEY,
CONSUMER_SECRET,
ACCESS_TOKEN,
ACCESS_TOKEN_SECRET,
options={
‘handle_rate_limit’: True
}
)

Next line [data = client.campaigns(‘all’)] with [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain

data = client.campaigns(‘all’)

I added all possible certificates digicert to cacert.pem under /lib directory where python executable is on Windows, still an error is there.
Any advice either how to solve the error or perhaps there is another python module which allows to connect to ADS-APIs?

PS: Exact same ssl certificate issue is thrown if I switch to another Python package from TwitterAPI package

from twitter_ads.client import Client

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.