I have a third party restful service that takes a licensed key as a query parameter value
e.g. www.samplerestservice.com?key=azcfdfdfxcvcsdasdassds
Once you will sign up on their page they will provide you a license key. My doubt is whether passing the key directly is fine or else how can I secure my calls to the API.
Many Thanks!
Actually you being as a client of third-party API are limited in choosing security measures. You need to accept all security rules required by service like using HTTPS with TLS - not HTTP, secure store your license key and so on.
Sending license key for every request is like sending every time password via Internet. It's not secure communication way of course and additional measures should be performed from service side. It can be HTTPS with TLS, IP address(s) restriction, license key expiration policy, time limitation for requests with bad keys, secure storing license keys (hashing) and so on. You should take into account these factors while choosing a third-party service.