# Block login

The login process for a block is the same as that for a gadget. The code is obtained through the login API [tt.login](https://open.feishu.cn/document/uAjLw4CM/uYjL24iN/block/api/user/login) and then the login verification API [code2session](https://open.feishu.cn/document/uYjL24iN/ukjM04SOyQjL5IDN) is called in the app backend service to verify the legitimacy of the code and obtain the user's identity.

Please refer to [gadget login](https://open.feishu.cn/document/uYjL24iN/uETO5QjLxkTO04SM5kDN) for detailed process.