token mismatch in action

I'm trying to port the Blogwatch plugin to 1.7 and have used elgg_add_action_tokens_to_url() to generate a URL that points to an action but the action is never called, as it throws the error:

"We encountered an error (token mismatch). This probably means that the page you were using expired. Please try again"

I used elgg_add_action_tokens_to_url() in another part of the code to fix a bug and it seemed ok but when I try it again it won't let me get to the action.

Anything I can try?