Compare variables 2 different policies apigee

I want to compare 2 variables before allowing to the Target endpoint

First variable example - I read the context variable from the Generate oauth token and retrieving it on the VerifyToken

Another variable is generate by the javascript and I want to compare these 2 values and if success want to send it across to the target endpoint.

Failure should return an error code with valid message.

I tried this on the preflow variable of the target endpoint and doesn’t populate the actual values on trace.

0 2 303
2 REPLIES 2

Please provide more info and if possible attach a sample proxy.

Comparing variables can be done within Javascript or a simple Condition for a RaiseFault policy can also be used.

I tried this on the preflow variable of the target endpoint and doesn’t populate the actual values on trace.

SHOW what you have tried. show the policy attachment Configuration in the target endpoint, and show the policy configuration. Also show the Trace (take a screenshot) of what happens.

ps: PreFlow is not a "variable". That's a policy attachment point.