# InvalidAuthenticityToken when using Mechanize

**URL:** <https://www.ruby-forum.com/t/invalidauthenticitytoken-when-using-mechanize/162592>\
**Category:** Rails\
**Created:** [March 11, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/invalidauthenticitytoken-when-using-mechanize/162592 "2009-03-11T17:38:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elioncho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ed8c4c/32.png) [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Post date:** [March 11, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/invalidauthenticitytoken-when-using-mechanize/162592/1 "2009-03-11T17:38:47Z")

</div>

I am sending post requests to another rails app via mechanize and  
getting the InvalidAuthenticityToken error. I know its due to the  
protect\_from\_forgery line on the application\_controller. How do I  
manage to overcome this?

Thanks a lot,

Elías
