Hey!
I'm following this article: https://developer.apple.com/documentation/apple_search_ads/implementing_oauth_for_the_apple_search_ads_api#see-also
I'm now at the "Request an Access Token"-step. Just getting <Response [400]> and {"error":"invalid_client"}.
Anyone have an ideas here? If so I would greatly appreciate it!
Using the following Python code: (in url I paste in my client_id and client_secret.)
import requests
url = "https://appleid.apple.com/auth/oauth2/token? grant_type=client_credentials&client_id=<insert_client_id>&client_secret=<insert_client_secret>&scope=searchadsorg"
headers = { 'Host': "appleid.apple.com", 'Content-Type': "application/x-www-form-urlencoded", }
params = { 'client_id': client_id, 'client_secret': client_secret, 'grant_type': 'client_credentials', 'scope': 'searchadsorg' }
response = requests.post(url, headers=headers, params=params)