0

Hi I'm trying to develop a tool to copy a journey between Business Units, I successfully manage to retrieve journey's data and send it but only on my own Business Unit. I have used this doc to do this (Interactions): https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/routes.htm , Post request: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/postCreateInteraction.htm . But I see nowhere something able to target a specific Business Unit while your post request. Am I doing it wrong ? Or is it impossible with the REST API ?

2

The REST API is based on the application or package that you get your auth token from. So if you wanted to switch from BU 1 to BU 2, you would need to make another request token call using the different Client ID / Secret combination and utilze that auth token in your further requests.

For example:

  • BU 1 has a package created for your API integration with Client ID - 4 and Client Secret - 2.
  • BU 2 has a package created for your API integration with Client ID - 6 and Client Secret - 9.
  • You would first make a requestToken auth call using BU 1 ID/Secret combo. This would give you access to interact with BU 1.
  • Once you complete BU 1 stuff, you would need to make a second request Token call using BU 2 ID/Secret combo.
  • You would then be able to do whatever interaction with BU 2 you need. BUT if you need to go back and edit BU 1, you would need to create another request Token call using BU 1 info.
  • Ok that's what I thought to do but when I go to "Administration>Installed Packages", I see my package from my BU1 when I'm in BU2 so do I have to do a new package with API when I'm in BU2 to make it linked to that BU ? – Pierre-Adrien Delisle Jun 27 '18 at 13:51
  • no need to link you just create a package in BU 1 and a package in BU 2. then use the corresponding ID / Secret in the auth calls for your token. – Gortonington Jun 27 '18 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.