Hello!
I am working, for a customer, on a server side proxy in C# for the Campaign APIs and after fighting my way through the JWT authentication using the Microsoft jwt libraries I was ready to try out my first test following the examples here Campaign Standard: use APIs to optimize your cross-channel campaigns
I have built out the call as noted in the documentation... and so I am calling https://mc.adobe.io/<instance>.adobe.com/campaign/profileAndServices/service where <instance> is my instance name. I have previously created the integration in Adobe IO console.
When I make the call, though, all I get back is {"headers":{"X-Request-Id":"ngx.var.requestId"},"http_status":400,"message":"No match in backends for the given tenant id."}
What am I missing?
Thanks,
Thom
Below is the code that makes the call
public async Task<SubscriptionServiceList> GetAvailableSubsriptionServicesAsync() {
SubscriptionServiceList result = new SubscriptionServiceList();
ApiAccessToken AccessToken = GetAccessToken();
result.AsOfDate = DateTime.Now;
HttpClient client = new HttpClient();
var httpRequestMessage = new HttpRequestMessage {
Method = HttpMethod.Get,
RequestUri = new Uri(ServiceListingEndpoint),
Headers = {
{HttpRequestHeader.ContentType.ToString(),"application/json" },
{ HttpRequestHeader.Authorization.ToString(), AccessToken.HttpRequestHeaderText },
{ HttpRequestHeader.CacheControl.ToString(), "no-cache" },
{ "X-Api-Key", APIKey }
}
};
Task<HttpResponseMessage> t = client.SendAsync(httpRequestMessage);
t.Wait();
HttpResponseMessage response = t.Result;
using (HttpContent respContent = response.Content) {
string toLoad = await respContent.ReadAsStringAsync();
System.Diagnostics.Debug.WriteLine (toLoad)
//TODO load string into JSON object for parsing and load response value
}
return result;
}
Solved! Go to Solution.
The tenant in the url is only the instance name and shall not contain the parrt ".adobe.com"
The tenant in the url is only the instance name and shall not contain the parrt ".adobe.com"
Views
Replies
Total Likes
Thanks for the quick reply! I could swear I had tried that before, but I removed the extra ".adobe.com" and it seems to be working now. Notably, the documentation for lesson 5 at Campaign Standard: use APIs to optimize your cross-channel campaigns says it should be there.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Forwarding this to the documentation team.
Thanks for the catch, Thom!
Views
Replies
Total Likes
Views
Likes
Replies