Is there any way to make request from client to external resource and retur

More detailed:
Working with an api that gives me an access token which works only with client ip, so I`m trying to make a request to that external site on client and return the JSON response to my server. The question is how to make the request and store JSON on client so I could send it to server then.

Thank you

Does this wiki article help? It describes how to make a JavaScriptExtension.

https://vaadin.com/wiki/-/wiki/Main/Integrating%20a%20JavaScript%20library%20as%20an%20extension