# User logged out of server (REST API +IFrame commands)

**URL:** <https://forums.rocket.chat/t/user-logged-out-of-server-rest-api-iframe-commands/1631>\
**Category:** Community Support\
**Created:** [July 19, 2018, 5:27pm UTC](https://forums.rocket.chat/t/user-logged-out-of-server-rest-api-iframe-commands/1631 "2018-07-19T17:27:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MindtoEye](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/mindtoeye/32/440_2.png) [@MindtoEye](https://forums.rocket.chat/u/MindtoEye)\
**Post date:** [July 19, 2018, 5:27pm UTC](https://forums.rocket.chat/t/user-logged-out-of-server-rest-api-iframe-commands/1631/1 "2018-07-19T17:27:06Z")

</div>

I’m trying to embed Rocketchat in an iframe and automatically create accounts for users and log them in. I’m using the REST API to create the accounts and log them in. I’m using the postMessage command to then log them into the rocketchat site running in the iframe.

All of the code runs just fine and the account is created properly. However, when I try to log into the iframe using the token I got through the REST API login, I see the following in my console:

details: undefined  
error: 403  
errorType: “Meteor.Error”  
isClientSafe: true  
message: “You’ve been logged out by the server. Please log in again. [403]”  
reason: “You’ve been logged out by the server. Please log in again.”

Anyone know how I can fix this?

---

<div class="post-metadata">

**Author:** ![ptkferraro](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@ptkferraro](https://forums.rocket.chat/u/ptkferraro)\
**Post date:** [February 14, 2019, 10:25am UTC](https://forums.rocket.chat/t/user-logged-out-of-server-rest-api-iframe-commands/1631/2 "2019-02-14T10:25:52Z")

</div>

Hi MindTo… I have the same problem. Did you make it run? what did you do?

cheers
