Pay Per View security error message

Hi there, I have entered the PayPal API Credentials but still run in sandbox mode.
But I get an error message: "There was a problem connecting to PayPal to setup your purchase. Please try again.
10002 – Security error – Security header is not valid"

How do I get this solved? Thanks