# OpenVidu v3 with v2compatibility: 405 error on /api/tokens endpoint in Spring Boot

**URL:** <https://openvidu.discourse.group/t/openvidu-v3-with-v2compatibility-405-error-on-api-tokens-endpoint-in-spring-boot/5402>\
**Category:** Issues developing apps\
**Created:** [July 22, 2025, 4:50pm UTC](https://openvidu.discourse.group/t/openvidu-v3-with-v2compatibility-405-error-on-api-tokens-endpoint-in-spring-boot/5402 "2025-07-22T16:50:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince02444](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vince02444](https://openvidu.discourse.group/u/vince02444)\
**Post date:** [July 22, 2025, 4:50pm UTC](https://openvidu.discourse.group/t/openvidu-v3-with-v2compatibility-405-error-on-api-tokens-endpoint-in-spring-boot/5402/1 "2025-07-22T16:50:22Z")

</div>

I am looking to use **OpenVidu version 3 with v2compatibility**. I have an Angular frontend using **openvidu-browser** , and a Spring Boot backend.

As indicated in the documentation, I updated the libraries to **openvidu-java-client-v2compatibility** and **openvidu-browser-v2compatibility (JS)**. On the server side, I cloned **openvidu-local-deployment** and started the **Pro version Docker Compose**.

My issue is on the Spring Boot side. When generating the token with:

`return session.generateToken(tokenOptions);`

the request is sent to:

`http://localhost:4443/openvidu/api/tokens`

but this endpoint returns a **405 error**. It looks like this route does not exist. I don’t understand how this could work out of the box without it, as the token now seems to be provided by LiveKit.

I would like to know if I can still use **v2 compatibility with OpenVidu 3** , or if I should plan for a **migration to v3**.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [July 22, 2025, 4:56pm UTC](https://openvidu.discourse.group/t/openvidu-v3-with-v2compatibility-405-error-on-api-tokens-endpoint-in-spring-boot/5402/2 "2025-07-22T16:56:28Z")

</div>

Hello @vince02444 , the `/openvidu/api/tokens` is deprecated since version 2.16.0.

I would consider to take a look to any of the tutorials in 2.31.0 like this one: [openvidu-angular - OpenVidu Docs](https://docs.openvidu.io/en/2.31.0/tutorials/openvidu-angular/) .

You need to use the [Connection API](https://docs.openvidu.io/en/2.31.0/reference-docs/REST-API/#the-connection-object) to create a connection and then get the token from there.

All tutorials uses that approach.

Migrating to v3 is recommended though. If you want to use v3 you can check [these tutorials](https://openvidu.io/latest/docs/tutorials/application-client/angular/)

---

<div class="post-metadata">

**Author:** ![vince02444](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vince02444](https://openvidu.discourse.group/u/vince02444)\
**Post date:** [August 11, 2025, 7:57am UTC](https://openvidu.discourse.group/t/openvidu-v3-with-v2compatibility-405-error-on-api-tokens-endpoint-in-spring-boot/5402/3 "2025-08-11T07:57:20Z")

</div>

Hello,

Thank you very much for your reply. Sorry for the late response, I was on vacation 🙂  
Indeed, I hadn’t noticed that it was deprecated.  
We have a time constraint to get the current system working. As it is, it works using `/openvidu/api/tokens`.  
If I can no longer use **openvidu-browser** and have to switch to **openvidu-angular** , I think it would be better to go ahead and migrate directly to v3.
