Click here to Skip to main content
15,070,974 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone! I came across the problem with an authenticity token. My task is to log in programmatically at http://www.greystripe.com and then retrieve some information. Post parameters to send login request are:

authenticity_token: /bHuPcrEK3noThK07d0JyZfCbPrytxjJeBA3tEgDrDw=
commit: Login
email: blablabla@bla.com
password: blabla

My question is WHERE to get correct AUTHENTICITY TOKEN? Earlier I used constant value I got once in Firebug. May be somebody have already solved this issue. Give me some advice, please. Thanks in advice.
Posted
Updated 18-Jan-11 0:12am
v5
Comments
Hiren solanki 18-Jan-11 4:24am
   
Don't you know you've provided working id password.
Pavel Yermalovich 18-Jan-11 4:28am
   
Thnks. I was in a hurry.

1 solution

I found out there is some information at page before logging in. I digged out a hidden field with this TOKEN. So, solution for my issue is:

1. Get athenticity token before POST from hidden field.
2. Fill in POST parameters including athenticity token.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900