@Ankita Kanzariya With the SDK packages, I think this is a known issue. After the migration of the search APIs from cognitive services to bing there is no update to use the latest version of the APIs, this causes the SDK samples to fail. With the REST API though, you should be able to get a response with a call to the correct endpoint along with its keys in the header. Could you please add sample code that was used when you used REST API? Thanks!!
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.