
I have created an API Client under Account Manager
In Business Manager for my user under Manage Access Keys I created "Agent User Login and OCAPI"
When I test making a call to https://[sandbox domain]/dw/oauth2/access_token?client_id={API Client ID}
with header info:
basic_auth_token = b64encode(
bytes(f"{business_manager_username}:{business_manager_password}:{api_client_password}",
"utf-8")
).decode("ascii")
headers = {}
authorization = f"Basic {basic_auth_token}"
headers["Authorization"] = authorization
headers["Content-type"] = "application/x-www-form-urlencoded"
headers["Cache-Control"] = "no-cache"
and
data = {
"grant_type": "urn:demandware:params:oauth:grant-type:client-id:dwsid:dwsecuretoken"
}
I keep getting HTTP 400 with error message:
"Client id 'client id' has invalid credentials to use grant type 'urn:demandware:params:oauth:grant-type:client-id:dwsid:dwsecuretoken'."
anyone can pinpoint what I am doing wrong?