Skip to main content
added 193 characters in body
Source Link
Mark G
  • 1.6k
  • 1
  • 7
  • 15

The value of @token is being passed to HTTPPost(), but that's missing the required string "Bearer " (which does appear in @accessToken). In other words, your API request should instead look like:

HTTPPost(
  "https://subdomainofcompany.rest.marketingcloudapis.com/interaction/v1/events",
  "application/json",
  @body,
  @callstatus,
  'Authorization',
  @accessToken
)

An aside: CloudPages returns a status of 500 and also mentions 500 in the body. Legacy/Classic Microsites returns a status of 200 but is a little more helpful by mentioning 401 in the body.

The value of @token is being passed to HTTPPost(), but that's missing the required string "Bearer " (which does appear in @accessToken). In other words, your API request should instead look like:

HTTPPost(
  "https://subdomainofcompany.rest.marketingcloudapis.com/interaction/v1/events",
  "application/json",
  @body,
  @callstatus,
  'Authorization',
  @accessToken
)

The value of @token is being passed to HTTPPost(), but that's missing the required string "Bearer " (which does appear in @accessToken). In other words, your API request should instead look like:

HTTPPost(
  "https://subdomainofcompany.rest.marketingcloudapis.com/interaction/v1/events",
  "application/json",
  @body,
  @callstatus,
  'Authorization',
  @accessToken
)

An aside: CloudPages returns a status of 500 and also mentions 500 in the body. Legacy/Classic Microsites returns a status of 200 but is a little more helpful by mentioning 401 in the body.

Source Link
Mark G
  • 1.6k
  • 1
  • 7
  • 15

The value of @token is being passed to HTTPPost(), but that's missing the required string "Bearer " (which does appear in @accessToken). In other words, your API request should instead look like:

HTTPPost(
  "https://subdomainofcompany.rest.marketingcloudapis.com/interaction/v1/events",
  "application/json",
  @body,
  @callstatus,
  'Authorization',
  @accessToken
)