I'm trying to integrate with the https://auth.exacttargetapis.com/v1/requestToken
endpoint to receive an AuthToken to communicate with the Salesforce REST API, like here.
I created a Connected App and received my Consumer Key and Consumer Secret (clientId & clientSecret) but I keep receiving the following error when I try to post my credentials to the endpoint:
{ "message": "Unauthorized", "errorcode": 1, "documentation": "" }
That is the crux of my issue which could be a number of different things, but here is some other pertinent information:
- The User I created the Connected App with, my own user, is a "System Administrator" with "API Enabled" checked
- I am on a free version, I have not paid for any license
- I have selecetd all possible scopes for the Connected App under "Selected OAuth Scopes"
- I allowed "all users to self-authorize" as via this answer
- I an unable to find the "API Integration Component" as described here under the Package Manager / Installed Packages fields, which seems to be a point of importance in all the docs that I have seen.
Best Answer
I think the issue here is you created connected app in salesforce ORG and not in marketing cloud. Marketing cloud does not provide a free/trial account(I suppose there is a way to get demo account for partners).
The link which you have shared itself says that you need to create a package in Marketing cloud. After creating this package you will get client id and client secret.
From Doc:
The Rest APIs which you want to access are Marketing cloud APIs not the Salesforce Rest APIs, So you need to create a package in Marketing cloud account.