Background: I'm developing a rails webapp that sends emails. I'm using the MarketingCloudSDK gem to interact with the salesforce API, ultimately to use the triggered emails feature.
I'm not the salesforce admin for my organization, so I requested someone set up an API keypair for me, citing the following instructions that I pieced together from salesforce documentation websites (here and here):
- Go to Marketing Cloud | Administration | Installed Packages.
- Click New.
- Give the package a name and description.
- Save the package. Once the package is saved, you see important details about the package. See Installed Packages Definitions for more information about each field. You see the Package ID, JWT Signing Secret, and Source Account only for packages created in your account.
- Under Components, click Add Component.
- Select API Integration.
- Save the component. Under the component details, you find the Client ID and Client Secret. Use these credentials with the API’s authentication service to get OAuth access tokens that authenticate your API calls.
Eventually, I was given an ID and secret, but they belong to an API User, not an API Integration. I tried posting them to https://auth.exacttargetapis.com/v1/requestToken with curl anyway, and I get {"message":"Unauthorized","errorcode":1,"documentation":""}.
Am I missing something? It seems like I should be able to use these credentials in some way to interact with the API, but I have not been able to find how, and while there's plenty of documentation on how to create an API User, there doesn't seem to be any documentation on what to do once you have one.
tl;dr: I have the credentials for an API user. How can I use them to get an API access token?
Best Answer
Sounds like you need to designate an API user:
Once the user has been designated, you can assign API permissions:
Here are the steps for installing a package and configuring a Client ID and Client Secret to authenticate your REST API calls:
For authorizations, the endpoint is
https://auth.exacttargetapis.com
.Once everything's configured, try requesting a token:
The endpoint for all of the other SFMC REST API calls is
https://www.exacttargetapis.com/
.