Forum Discussion
Connect to Bamboo's REST API- Error"Web API key can only be specified when API key name is provided"
Hey,
API KEY is not the right way here.
Use Basic Authentication instead.
Or if it a header parameter
let
Source= Json.Document(Web.Contents("https://api.bamboohr.com/api/gateway.php/{company subdomain name}/" , [Headers=[Authorization=YOURAPIKEY"]])),
Greetings
- mparravani8 years agoRegular Visitor
Hey,
Thanks for the quick response.
When I try this, and choose Anonymous credentials, I get the following error:
DataSource.Error: Web.Contents failed to get contents from 'https://api.bamboohr.com/api/gateway.php/COMPANYID/' (404): Not found
Details:
DataSourceKind=Web
DataSourcePath=https://api.bamboohr.com/api/gateway.php/COMPANYID
Url=https://api.bamboohr.com/api/gateway.php/COMPANYID/All I have in the query line is:
= Json.Document(Web.Contents("https://api.bamboohr.com/api/gateway.php/COMPANYID/", [Headers=[Authorization="APIKEY"]]))
thanks
-Mike
- WolfBiber8 years agoMicrosoft Employee
Hey,
the query lin should look like this:
let Source= Json.Document(Web.Contents("https://YourURI" & "Contact/" , [Headers=[Authorization="" & Token &""]])), objects = Source[objects] in objectsBut you have to investigate where the bamboo API wants the Credentials or Token.
Error 404 says that the url you are using is not found on the server.
Maybe try a Client like Postman to be sure everythings is working.
Greetings,
Wolf