# Access token invalid

**URL:** https://forum.social.plus/t/access-token-invalid/1514
**Category:** General
**Created:** [October 30, 2024, 8:21am UTC](https://forum.social.plus/t/access-token-invalid/1514 "2024-10-30T08:21:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Marcocrea](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@Marcocrea](https://forum.social.plus/u/Marcocrea)
#### Post date: [October 30, 2024, 8:21am UTC](https://forum.social.plus/t/access-token-invalid/1514/1 "2024-10-30T08:21:45Z")

</div>

Hi,  
we not used chat for a long time, and we need to go in production. Testing rest API by bearer token I obtain

```auto
{
  "status": "error",
  "message": "Access token is invalid.",
  "code": 400100,
  "data": {
    "detail": {
      "appErrorCode": 400100
    }
  }
}

```

but token is ok because in asc console, settings integration API key is the same. Someone can help us?  
Sorry, I connect to right region, but in my region the error message is “Token has expired”

---

<div class="post-metadata">

### Author: ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)
#### Post date: [October 30, 2024, 1:33pm UTC](https://forum.social.plus/t/access-token-invalid/1514/2 "2024-10-30T13:33:49Z")

</div>

Hello @Marcocrea, please ensure you’re using the correct user ID when registering the session to obtain the auth token. Also, note that the access token is valid for 30 days but will be invalidated if a different userid will use the same token to register the same device.

**For more info, please see this section:** [https://docs.amity.co/analytics-and-moderation/console/settings/security#secure-mode](https://docs.amity.co/analytics-and-moderation/console/settings/security#secure-mode)
