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 ?
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.
- 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.