• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to add api key and api secret key in the url for connecting to api of a website.

 
Rajat kachhwaha
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
    i want to connect to the api of a website and get data from it, i have the api key and api secret key for the same. can you please tell me how to add api key and api secret to the url and connect to the website.
If you can mention the format/snippet explaining the same that will be great.
Thank you so much!
 
Tim Moores
Saloon Keeper
Posts: 3260
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on how authentication is set up, which differs from API to API. Didn't you get instructions along with the API key?
 
Stephan van Hulst
Bartender
Posts: 6583
84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that depends on the website.

The website should have a guide somewhere on how to access their API.
 
Rajat kachhwaha
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:It depends on how authentication is set up, which differs from API to API. Didn't you get instructions along with the API key?

The website gave api keys nd secret key and says use Oauth authentication and send the keys with url. I just want to know the syntax or methods on how to include keys in the url for post requests.
 
Rajat kachhwaha
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:Well, that depends on the website.

The website should have a guide somewhere on how to access their API.

The website gave api keys nd secret key and says use Oauth authentication and send the keys with url. I just want to know the syntax or methods on how to include keys in the url for post requests.
 
Paul Clapham
Sheriff
Posts: 21882
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not just "syntax" or "methods" you should be looking for. It says to use "OAuth authentication". So that's what you should be looking for.

From one blog I read after searching the web for how to use oauth:

There are a lot of technical details involved in the implementation of your own OAuth application.
 
Tim Moores
Saloon Keeper
Posts: 3260
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Paul said, using OAuth is more involved that just altering the URL. (Actually, it would be a bad idea to pass authentication data in the URL, so that's a good thing :-)
 
Stephan van Hulst
Bartender
Posts: 6583
84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's probably easiest if you find a library to do OAuth for you, so you can concentrate on your project. It's also more secure.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!