I need to use a third party API call in my client side JS and I know one way is to use a server proxy(for eg. www.myserver.com/getdata/) which can call the API and return the result to the front end. My question is even if I use a server proxy, won't someone else be able to make use of my third party API key indirectly by calling my server proxy instead of directly calling the Third party.
I think the title is misleading, so i will try to answer the question stated in the body. Yes and no: They can make use of the third party API key indirectly, but you retain full control over what data they can see. You also can validate user input before it is handed to the third party. Imagine a payment API: Do you really want to have the user have control over the amount of money you want to charge them?
In other words: If the API key of the third party is supposed to be kept secret then it probably is not a good idea to have it on the client.