Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Launch APIs - list audit events

mattb34575278
Level 2
Level 2

Hi - the GUI for launch is a bit limiting when it comes to searching for items, or listing out large numbers of items. This is particularly bad when trying to search through the audit logs.

As such, I figured I'd use the API to get the full list of audit logs - this one: Launch Documentation

I've set up the IO integration, and generated all the necessary tokens.

I've filled out all the fields in the example request:

curl https://mc-api-activation-reactor-integration.adobe.io/audit_events \
  -H "Accept: application/vnd.api+json;revision=1" \
  -H "Content-Type: application/vnd.api+json" \
  -H "Authorization: Bearer [TOKEN]" \
  -H "X-Api-Key: [KEY]" \
  -X GET

However, when I send the request I get the following:

{

    "errors": [

        {

            "status": "403",

            "code": "oauth-token-required",

            "title": "Oauth token is missing",

            "meta": {

                "request_id": "**********n4MYwbXONMB2**********"

            }

        }

    ]

}

I'm not very experienced with APIs, and I'm sure it's something obvious I'm missing, but I don't know how to generate the OAuth token or how tto reference it once I do. And it's not mentioned in the documentation.

Thanks

Matt

1 Accepted Solution
Stewart_Schilling
Correct answer by
Community Advisor
Community Advisor

You bet.  Just to be clear, try it with this endpoint.

https://mc-api-activation-reactor.adobe.io/audit_events

Here is what your curl command should look like (note: I have modified the bearer token and clientID, so this exact command will not actually work).

View solution in original post

7 Replies
Stewart_Schilling
Community Advisor
Community Advisor

Hi Matt,

There are two things missing in your API request.  [TOKEN] and [KEY].

Essentially, in order to make API requests, you need to create an Integration (service account) in Adobe I/O.

That account has an API Key (aka client ID) which you would use where it says [KEY].

You will also need to generate a "bearer token" via JWT exchange and put that value in [TOKEN].

There is an instructional doc here: Launch Documentation

I hope this gets you going!

-Stew

mattb34575278
Level 2
Level 2

Hi Stew

Thanks for that - I've already done the steps you mention; sorry I took the example I copied above from the documentation rather than sharing my client ID and bearer token publicly.

I still get the error described.

Thanks

Matt

Stewart_Schilling
Community Advisor
Community Advisor

Does your API endpoint include "-integration"

If so, try taking that out.

Stewart_Schilling
Correct answer by
Community Advisor
Community Advisor

You bet.  Just to be clear, try it with this endpoint.

https://mc-api-activation-reactor.adobe.io/audit_events

Here is what your curl command should look like (note: I have modified the bearer token and clientID, so this exact command will not actually work).

View solution in original post

mattb34575278
Level 2
Level 2

I'll give it a go and come back to you. I'll likely need to re-generate my bearer token first as I think they expire after 24 hours.

Thanks

Matt

mattb34575278
Level 2
Level 2

Hey - thanks, that worked. I'd got it into my head they went into the "body" rather than "header". I saved your example as json and imported it, then replaced it with my values 🙂