# Request failed with status code 403 in test environment

**URL:** <https://community.forestadmin.com/t/request-failed-with-status-code-403-in-test-environment/3648>\
**Category:** Help me!\
**Created:** [October 29, 2021, 9:18pm UTC](https://community.forestadmin.com/t/request-failed-with-status-code-403-in-test-environment/3648 "2021-10-29T21:18:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Mathieu\_Breton](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/mathieu_breton/32/63_2.png) [@Mathieu\_Breton](https://community.forestadmin.com/u/Mathieu_Breton)\
**Post date:** [November 9, 2021, 12:10pm UTC](https://community.forestadmin.com/t/request-failed-with-status-code-403-in-test-environment/3648/3 "2021-11-09T12:10:52Z")

</div>

Hello,

Finally, I figured out the problem. It’s not related to the versions. The problem still occurred on v8.2.8.  
By digging in the forest-express-sequelize code, we found the property `role` was mandatory in the JWT sent to the forest endpoints. So If I update the code shown before, the code looks like that:

```javascript
export const getForestToken = async () => {
  const FOREST_AUTH_SECRET = env().FOREST_AUTH_SECRET;
  const user = {
    id: "44907",
    email: "toto.toto@swan.io",
    firstName: "toto",
    lastName: "toto",
    team: 62937,
    renderingId: 105033,
    role: 957,
  };
  return jwt.sign(user, FOREST_AUTH_SECRET, {
    expiresIn: "30 minutes",
  });
};

```

I don’t know why it appears now but it solved our problem.  
You should update your doc : [Run automated tests - Woodshop](https://docs.forestadmin.com/woodshop/how-tos/run-automated-tests)  
It doesn’t mention this property.

---

_[View the full topic](https://community.forestadmin.com/t/request-failed-with-status-code-403-in-test-environment/3648)._
