I've found more info about the error I was getting.
The API works when I added a companyDesc parameter to the query. Perhaps the reason it gave me an error previously with the first query I attempted is that query was too simple (all companies in state of MA) and would have resulted in too many companies in the response (beyond some limit?).
Is there some way I could have my software gracefully detect or prevent that kind of condition, such as by asking for some number of response data items instead of receiving the Authentication Error with no company data?
The authentication error you are receiving is because of the value the system is looking for with the state is the full state name, not the 2 letter abbreviation. There are a list of acceptable values - http://www.zoominfo.com/about/misc/api/api-doc-options.html#State
I received my ZoomInfo key about 15 minutes ago (thank you), but when I tried my first simple use of the API it gives me "Authentication Failed.
Here's the response XML I receive back:
<?xml version="1.0" encoding="utf-8"?>
<CompanySearchRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://partners.zoominfo.com/PartnerAPI/XSD/CompanyQuery.xsd"><SearchParameters><Parameter><Name>state</Name><Value>MA</Value></Parameter></SearchParameters><ErrorMessage>Authentication Failed</ErrorMessage></CompanySearchRequest>
And here's my query URL that I sent to receive that:
"http://api.zoominfo.com/PartnerAPI/XmlOutput.aspx?pc=" + zoominfoKey +
"&query_type=company_search_query&state=MA");
(where xoominfoKey is copy/paste from the email I was sent (checked it carefully, starts with q, ens with 8).
Thanks for any help. Perhaps is there some delay between when the key is emailed and when it will start working?
Tags
Masher – 7 months ago
I see that XML paste didn't show up completely.
Here's a more readable formatting of the error response the API give me (tried it again, still gets same error).
<?xml version="1.0" encoding="utf-8"?>
<CompanySearchRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://partners.zoominfo.com/PartnerAPI/XSD/CompanyQuery.xsd">
<SearchParameters>
<Parameter>
<Name>state</Name>
<Value>MA</Value>
</Parameter>
</SearchParameters>
<ErrorMessage>Authentication Failed
</ErrorMessage>
</CompanySearchRequest>
Masher – 7 months ago
I've found more info about the error I was getting.
The API works when I added a companyDesc parameter to the query. Perhaps the reason it gave me an error previously with the first query I attempted is that query was too simple (all companies in state of MA) and would have resulted in too many companies in the response (beyond some limit?).
Is there some way I could have my software gracefully detect or prevent that kind of condition, such as by asking for some number of response data items instead of receiving the Authentication Error with no company data?
Thank you.
ZoomInfo Admin – 7 months ago
The authentication error you are receiving is because of the value the system is looking for with the state is the full state name, not the 2 letter abbreviation. There are a list of acceptable values - http://www.zoominfo.com/about/misc/api/api-doc-options.html#State