# User Auto login and open user channel page without ask for login

**URL:** <https://forum.mattermost.com/t/user-auto-login-and-open-user-channel-page-without-ask-for-login/2208>\
**Category:** Troubleshooting\
**Created:** [September 7, 2016, 3:37pm UTC](https://forum.mattermost.com/t/user-auto-login-and-open-user-channel-page-without-ask-for-login/2208 "2016-09-07T15:37:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravidverve](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@ravidverve](https://forum.mattermost.com/u/ravidverve)\
**Post date:** [September 7, 2016, 3:37pm UTC](https://forum.mattermost.com/t/user-auto-login-and-open-user-channel-page-without-ask-for-login/2208/1 "2016-09-07T15:37:10Z")

</div>

Hi There,

I have developed mattermost login API code in PHP to auto login for user. The php login script request the login API and create cookie of token which I get in API response header.  
Now I want to redirect the user to their channel after getting the token in login API response.  
But I stuck here, when I redirect the users to their channel URL the mattemost ask for login authentication.

I have search around the net but didn’t getting any way to do this,  
Please help me to fix it.

Thanks
