Connecting to CJ API - api

Im trying to make a REST api work with VB.NET (http://help.cj.com/en/web_services/web_services.htm#Commission_Detail_Service.htm)
This is CJ commission's API.
The problem I have is that Im trying to add the service reference https://commission-detail.api.cj.com/v3/commissions but its not working, and when I go straight to that address on the web browser, its asking me for the developer key, which I have, but I dont know how to enter it.
Does anyone have a sample code on how to connect to that API?
Thanks!

I guess you don't need it by this time, but still, for those who'll have the similar question and get to this page: you should pass your developer key as the authorization header of your request. Depending on how you make requests, it could look something like this in VB.NET:
HttpWebRequest.Headers.Add("authorization", "your_dev_key")

Related

How to make an API call without exposing the key (HTTPS)

I was working on a project, and needed to make an API call to my website https://dashboard.lawliet.host/api/setcoins, it took in a header Authorization, which was the admin API key.
I obviously don't want the API key exposed to the user if they check the outgoing requests, or deobfuscate the program. What is a good and easy solution to get around this?
What I did think of what to hash the API key in this program, and compare it with the key in my server. According to me, this will work, but I do want to know if there's a better/easier way to accomplish it.
P.S: English is not my first language, so if anyone could edit this question and fix any grammatical errors, I would appreciate it.
Thanks,
MisuteriasuKe

Google Cloud Text-to-Speech API Authentication from the frontend via API key possible?

The use case is a frontend application that does not have any backend so normally I would expect to use an api key ( https://cloud.google.com/docs/authentication/api-keys ) but in the complete text to speech documentation ( https://cloud.google.com/text-to-speech/docs/ ) I can't find any information about if (and how) its possible to use api keys for the Cloud Text-to-Speech API.
I don't think its such an uncommon use case to use the text to speech functionality in a standalone frontend (especially with the new WaveNet voices), so I thought I would ask the question here if anyone has some tips where to look for this information or if it's currently really only ment as an API usable in the backend.
If you have the same problem that I am facing right now then I can help you. I have the same issue asked in this question.
If you are using webpage to translate then you have to send your API key in URL of the request. The one way I tried is,
https://texttospeech.googleapis.com/v1beta1/text:synthesize?fields=audioContent&key={Your key goes here}.
I hope this will solve your problem.

How to acquire API key for Airbnb

I know that Airbnb haven't opened their API to the public yet, but searching the internet I found some people are using it.
I tried to contact them, and also Airbnb, but without any answers.
Does anyone here knows any contact email, page, or phone number that I can refer to?
I have read here that you can find your API key by looking at the requests that AirBNB uses in their own website. So use the web-developer tools in chrome, or firefox, or firebug in firefox and search trough the requests in the network panel until you find the key being used in any JSON request. Some urls contain this key param, you copy that :) works for me!
Oh BTW, i'd like to remind you that the API is currently not officially released to fetch data in the background while you are logged in. When you use this key, they'll know your identity. You might get blocked or at least warned by AirBNB for using their API while you are maybe not allowed to. Read their terms & conditions to make sure. I am not taking any responsibility, of course ;)
You can now find your API key on the meta tags of the source code when logged in to your dashboard. Search for canonical_host and you will find:
{"canonical_host":"www.airbnb.com","api_config":{"key":"<your-api-key>"}
Just to update this set of answers, the api is on the following address but you need to request access first.
https://www.airbnb.com/partner
It offers an FAQ that informs you about the process and it will always be updated
As far as I can tell, they have shut down this service as of today.
"Unfortunately, this is no longer available" will be what the API returns.
EDIT:
It started working again after a few days. Very odd, maybe an internal problem, or we were rate limited or something.
Log into Airbnb.com, open up the web developer console, go to the network tab, filter by type json, and look at the url and find "client_id".
I found this answer here

API help commission junction

Im new to the realm of API and I was wondering do I need to paste the code as is or would I need to add javascript and interface to it myself? Im working with commission juntion datafeeds and developer key to make a website that is similar to www.directtextbooks.com
Below is the website link with the instructions that they provide
http://help.cj.com/en/web_services/Product_Catalog_Search_Service_v.2.htm
You can use the API to get data from cj, but the results of the data is for what ever you want to use it for.
Before you start working with API's you should look into programming applications.

Objective-c web form based authentication

So I am working on an iPad app that needs to talk to our company server to pull in some XML. In a browser, when the user tries to first navigate to the site, they are redirected to an SSO form that generates a cookie that is saved.
Now my application may need to replicate this behavior and generate the cookie so we can pull xml data off various parts of the site. I have never done anything like this before and there is very little documentation on the web so I am really looking for some general guidance. So far I have tried doing something like this, here.
That works to return the web form, but where to go from there eludes me. Does anyone have any ideas they would like to throw out? Essentially all that I need to do right now is authenticate the user's credentials, and save that verification. If there is an easier way to do that based on this template, I would definitely be open to suggestions. Any help at all would be greatly appreciated.
What i use for a lot of my networking is ASIHTTPRequest it is an API that is available, instead of trying to use low level sockets or the Apple APIs, with a decent guide and an active Google Group for questions. It can certainly handle xml requests as well as authentication. Here is a link to the site, ASIHTTPRequest