0

This question was originaly posted in rapidapi forum

Basically, I want to use one of the free APIs provided by RapidApi (skyscanner api)..

It is quite straighfoward if you log in RapidApi. You are rerdirected to OAUTH2 server (gmail in my case) and then X-RapidAPI-Key is filled in automatically. I want to call it from my application but how can I retrieve X-RapidAPI-Key?

For instance, I guess I can call via PostMan some url from RapidApi.com which will redirect me to gmail and then I log in and it will provide me such X-RapidAPI-Key. I have looked for such info in their site but I didn't find it. Maybe it is so obvious but I don't know how to figure out it.

I assume it is exactly what it is happening behind the scene when rapidApi.com ask me to log in with my gmail/github/facebook account. Kindly, don't misunderstand my question as asking how to develop or consume an OAUTH2 server. It is quite specific about getting X-RapidAPI-Key from rapidapi.com without accessing it throw a browser.

Grokify
  • 15,092
  • 6
  • 60
  • 81
Jim C
  • 3,957
  • 25
  • 85
  • 162

1 Answers1

1

It doesn't look supported in neither RapidAPI nor Skyscanner. You should contact support/community and respectively ask both.

Depending on where does this Oauth flow happens, you can always try some cURL to perform logged-in actions to a specific webapp (e.g. rapidapi) if compatible. Then, output necessary elements to use as values.

Might not be super secure, but if it's for personal use, it shouldn't be a problem.

  • Kindly, would it be possible you exemplify "you can try some cURL to perform logged-in actions to a specific webapp"? – Jim C Jul 30 '19 at 19:35
  • 1
    Unfortunately, I have a guy for cURL. I personally have 0 experience. All I can say is that cURL can effectively log into an external webserver's login page and fetch info and or perform actions. Say: Log into forumx.com/login, once session cookie is established, go to url /overview.php or whatever, then fetch "x" element and output to a file or whatever. I know its possible, but I can not elaborate. Sorry. –  Jul 30 '19 at 20:44
  • 1
    Hence, you could theoretically log into rapidAPI, perform an action (generate a key... you need to check how complex the generation is as it might hinder the whole thing), fetch key and output to X. –  Jul 30 '19 at 20:45
  • well, I want eliminate the manual side and this I have no idea how to do for rapidApi provide its own key. Naturally I know how and there are several examples around how create my own site that route to gmail and get permission to be accessed. But it seems rapidApi was created somehow it routes me to gmail, generate their own key and from now on I need to use its key but it is own key instead of the one answered by gmail. – Jim C Jul 30 '19 at 22:18