I may be doing some rookie error but can't figure out what am i doing wrong.
Just want to get access token for SFMC below is what I have
{
"grant_type":"client_credentials",
"client_id": "XXXXX",
"client_secret": "XXXX",
"account_id":"1234"
}
Using below URL for POST
https://XXXXX.auth.marketingcloudapis.com/v2/Token
getting below error
{
"error": "invalid_request",
"error_description": "Make sure that the client ID and client secret are valid and that the following parameters are not empty or null: client ID, client secret, and grant type.",
"error_uri": "https://developer.salesforce.com/docs"
}
I have gone through help documentation available here but it didn't helped.
Any suggestions how can I receive access token for SFMC.
Error says about grant type parameter as I was also passing them like the example shown in above URL
Best Answer
I have replicated your error when I pass the following request
It should be
https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/access-token-s2s.htm