# Error to access a new environment

**URL:** <https://community.forestadmin.com/t/error-to-access-a-new-environment/6555>\
**Category:** Help me!\
**Tags:** setup\
**Created:** [August 10, 2023, 12:39pm UTC](https://community.forestadmin.com/t/error-to-access-a-new-environment/6555 "2023-08-10T12:39:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raphael\_Neves](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/raphael_neves/32/4604_2.png) [@Raphael\_Neves](https://community.forestadmin.com/u/Raphael_Neves)\
**Post date:** [August 10, 2023, 12:39pm UTC](https://community.forestadmin.com/t/error-to-access-a-new-environment/6555/1 "2023-08-10T12:39:12Z")

</div>

Hey folks,

We have set a new remote environment, and when I try to access it I get the error message below:

```javascript
{
    "errors": [
        {
            "status": 400,
            "detail": "The redirect uri must be one of https://forestadmin-us2.tymeshift.io/forest/authentication/callback. Received \"https://forestadmin-us3.tymeshift.io/forest/authentication/callback\"",
            "meta": {},
            "name": "InvalidRedirectUriError"
        }
    ]
}

```

What are the possible places where we set the redirect URL? Can you shed a light on this, please?

- Project name: TymeshiftFA
- Team name: Tymeshift Default Team
- Environment name: US3
- Database type: MySQL
- Recent changes made on your end if any: Created the new environment based on US1. From what we can see, all ENV vars are correct.

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [August 10, 2023, 12:52pm UTC](https://community.forestadmin.com/t/error-to-access-a-new-environment/6555/2 "2023-08-10T12:52:55Z")

</div>

Hello @Raphael_Neves,

Can you please:

1. Check that the value of `APPLICATION_URL` is correctly set on your new environment
2. Check that the environment secret is correctly set with a value ending with `376`
3. Check that no value is set for `FOREST_CLIENT_ID`. This value is no longer useful and can lead to issues with authentication.
4. Paste here the content of the variable named `clientId` shared during the authentication process. I would like to check what values it contains.

Thank you

---

<div class="post-metadata">

**Author:** ![Raphael\_Neves](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/raphael_neves/32/4604_2.png) [@Raphael\_Neves](https://community.forestadmin.com/u/Raphael_Neves)\
**Post date:** [August 10, 2023, 1:03pm UTC](https://community.forestadmin.com/t/error-to-access-a-new-environment/6555/3 "2023-08-10T13:03:14Z")

</div>

> [@GuillaumeGautreau](#):
>
> - Check that the environment secret is correctly set with a value ending with `376`

Hi, @GuillaumeGautreau  
Thanks for your reply:

1. is correct
2. is correct
3. we still have the CLIENT\_ID set.
4. `eyJraWQiOiJFN3E2Q0FWNGxuWUtwNmdPTlFiaWlZOFhVUDVWSHhmS21VUHZRSnV0Q1Q4IiwiYWxnIjoiUlMyNTYifQ.eyJ0b2tlbl9lbmRwb2ludF9hdXRoX21ldGhvZCI6Im5vbmUiLCJyZWRpcmVjdF91cmlzIjpbImh0dHBzOi8vZm9yZXN0YWRtaW4tdXMyLnR5bWVzaGlmdC5pby9mb3Jlc3QvYXV0aGVudGljYXRpb24vY2FsbGJhY2siXSwiYXBwbGljYXRpb25fdHlwZSI6IndlYiIsImdyYW50X3R5cGVzIjpbImF1dGhvcml6YXRpb25fY29kZSJdLCJyZXNwb25zZV90eXBlcyI6WyJjb2RlIl0sImVudmlyb25tZW50X2lkIjo1NTg0NCwiaXNzIjoiRk9SRVNUX0FVVEhFTlRJQ0FUSU9OX1NZU1RFTSIsImlhdCI6MTYzMzAxOTY4Mn0.hOHd-NkAuhPZWNqzxzeeEoduS7psI9DCd7KjuZON-d8UgUh4R8KhxkxZH2JxxPZeGeetsunkcIgKwlQ3dfj-M5sLRGeMoyl9Nu6P-GpwGvQQdrIu1YnRS3-ALfMkpo0dcnlDA1Moj50DTyMlgIk2ZlDymVwMPIF8ghdApb9mMzCik1hEWJjUKMhC4QqFTonJaJkjvq1U5BJ_KB0OLH2zBMF1BC38BXrMZSvHbvKWQhvdFUKiLh-AwYkHJjr0X3TAnSdEOO3Sbsllsws3jZYZFwSJSfiHyM7lUe_cTF8NmjxNa0dbS3h93iHh97GaTZTFmcQIyz1s4B4dyN2-YzS81Q`

---

<div class="post-metadata">

**Author:** ![Raphael\_Neves](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/raphael_neves/32/4604_2.png) [@Raphael\_Neves](https://community.forestadmin.com/u/Raphael_Neves)\
**Post date:** [August 10, 2023, 1:22pm UTC](https://community.forestadmin.com/t/error-to-access-a-new-environment/6555/4 "2023-08-10T13:22:50Z")

</div>

The CLIENT\_ID was the root cause. Removing it solved the it 🙂

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [August 10, 2023, 2:45pm UTC](https://community.forestadmin.com/t/error-to-access-a-new-environment/6555/5 "2023-08-10T14:45:14Z")

</div>

Thanks for sharing the solution.

I suggest removing this configuration in all of your environments, because it’s not needed anymore. We released an improvement with client ids that do not require setting a fixed value anymore, even in the case where there are multiple servers running.
