0

Trying to institute tokenized links in the emails that will allow users to sign-in to the company's website without having to enter credentials. Tokenized links are generated by the company backend on request via API. Security doesn't want the live, tokenized links visible to anyone prior to send other than SFMC admins. If the email is viewed in Preview, the API call executes and a tokenized link is generated for the user whose record was used to generate the preview.

Wondering if there's a way to stop the preview pane in Content Builder from executing the API call.

If not, any other suggestions for how to make it impossible for the non-admin users from being able to see the tokenized link?

Here's a video that shows the solution we're proposing for generating the links.

1 Answer 1

2

The solution here would be to wrap your API call in a conditional statement and utilize the messagecontext personalization string to determine the context in which the content is resolved:

%%[ 
  IF _messagecontext == 'PREVIEW' THEN
]%%

<p>
 This is just a preview.
</p>
%%[ ELSE ]%%

…(include your script here to make API call)…

%%[ ENDIF ]%%

More about this solution: https://help.salesforce.com/apex/HTViewSolution?id=000351478&language=en_US

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.