Delivery API and global mbox | Community
Skip to main content
Level 3
December 14, 2023
Solved

Delivery API and global mbox

  • December 14, 2023
  • 1 reply
  • 4450 views

Hello!

I need to implement the Delivery API using global mbox.

It seems that is not possible since I am receiving this error message as a response:

"status": 400, "message": "Errors: field - [execute.mboxes] - global mbox is not allowed in mboxes.;"

I found that another user fixed this by using "['execute']['pageLoad']" instead of "['execute']['mboxes']", however I don't understand how to implement this change since the API docs are not very clear.

In short, I need to get all the activities that are using the global mbox.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by PedroFi

Hello again @rajneesh_gautam_:

"evaluateAsTrueAudienceIds" under qaMode works for me when I test with a local mbox. However, global mbox is still not working on the QA mode. What am I possibly missing?

 

Could you also explain the meaning of these parameters? What do "a=1" and "b=2" represent exactly?

"execute": { "pageLoad" : { "parameters": { "a": 1, "b": 2 } }

We finally found a solution to this issue. 

The following element was missing from the request:

$data['context']['address']['url'] = [URL]

Thank you @rajneesh_gautam_ for your support, kind attention, and professionalism.

1 reply

PedroFiAuthor
Level 3
December 14, 2023

I have also tried to use "__view__" as the mbox name (since the global mbox is the "__view__" scope according to this docs) but it did not work.

Rajneesh_Gautam_
Community Advisor
Community Advisor
December 14, 2023

hi @pedrofi  - you are right, the documentation requires updates.

 

In the meantime, here's how you can use global-mbox. You need not mention the name of the mbox. Hope it helps

"execute": { "pageLoad" : { "parameters": { "a": 1, "b": 2 } } }

 

PedroFiAuthor
Level 3
December 18, 2023

Hi @pedrofi  - I coded a quick PHP program using cURL which successfully returns content from Adobe Target activity based on global mbox. Please find the code below. 

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://<<your-client-code>>.tt.omtrdc.net/rest/v1/delivery?client=<<your-client-code>>&sessionId=aa1f8a7be8234997aa7e5f12ce863d62', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>' { "context":{ "channel":"web" }, "id": { "tntId": "005d07c430b740f1b715e93a595be201.37_0" }, "experienceCloud" : { "analytics": { "logging": "client_side" } }, "execute": { "pageLoad" : { "parameters": { "a": 1, "b": 2 } } } } ', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

  


Thanks, @Rajneesh_Gautam_ 

Can I ask you what you mean by "successfully returns content"? Does it mean that you're getting a list of activities?

On my side, using the PHP code you provided, I am still getting the same result as mentioned here: no list of activities and empty value for [execute][pageLoad]