Forum Discussion
A web API key can only be specified when a web API key name is provided
Hello to all,
I would like to ask for your help concerning a problem on which I am on for some time...
The subject is about the web api and the possible connection with the web data source.
I would like to connect power Bi with a website called salsify.
On the website I am asked to use the following link https://app.salsify.com/api/orgs/{org_id}/export_runs
In my situation the {org_id} corresponds to the following code: ABCDEFG
I also attach the website of the site where the explanations are developed: https://developers.salsify.com/reference/start-export-run
But when I proceed to register the web link inside power BI, I have the following error message:
"A web API key can only be specified when a web API key name is provided
So I tried to register my APY key within the pop-up window that was displayed, but I still don't know why it doesn't work...
Here is a screenshot of the pop-up window with the error message:
In this case my APY key is : XYZABCD
THANKS GUYS FOR YOUR HELP !
11 Replies
- JirkaZSolution Specialist
Accordig to the documentation you provided the API doesn't support authentication using an API key. It only supports a bearer token to be used (either in the headers or in the URL).
Token Authentication (salsify.com)- EDO_01_1789Helper I
thank you for your feedback JirkaZ
I'm afraid I don't understand?so the connection with power bi is not possible?
if not, which link should I use?
I am quite new with this kind of subject, can you give me more details?
I thank you for the time you spend with me.
looks,
- JirkaZSolution Specialist
It means that your URL for the web request should look like:
https://app.salsify.com/api/orgs/ABCDEFG/export_runs?access_token=YOUR-AUTH-TOKEN
and in the dialog above you should select Anonymous.But I noticed the Export Run is a POST command so it won't be as easy as that.
You'll have to specify the request body too.
Chris Webb's BI Blog: Web Services And POST Requests In Power Query Chris Webb's BI Blog (crossjoin.co.uk)
- EDO_01_1789Helper I
JirkaZ
Humm, I hadn't seen your second link and I just read it and applied the method.but since I'm very bad at programming, I guess my code doesn't mean anything.
here is my code :let SalsifyKey = "pOae0egsjqz12-M5TkZBxuYxzv2DN0cA8Bnalnj3Fqc", entity_type= product, ProductList = List.Transform(Product), each Number.ToText(entity_type), GetElevations = Web.Contents(https://app.salsify.com/api/orgs/s-ce10487b-d3bb-4ee6-9f40-0b854ab97d15/export_runs?access_token=pOae0egsjqz12-M5TkZBxuYxzv2DN0cA8Bnalnj3Fqc [Content=Text.ToBinary(PostContents)]), { "configuration":{ "entity_type":"product", "format":"csv", "filter":"=list:default", "properties":"'UPC','Product Name','Brand','Main Image','Short Description','Long Description'", "include_all_columns":false, "sort_order":"desc", "sort_property":"Brand" } } in #"Converted to Table"can you help me
- JirkaZSolution Specialist
First of all you shouldn't post your auth tokens publically.
Secondly - I checked this API call (export_runs) and it really doesn't return any usable data. It only triggers some kind of data export, but doesn't return the values of the data.
- EDO_01_1789Helper I
ah sorry , I forgot to blur my identification.
if i understand correctly, i can't extract information from salsify ?
Since you tried, can you send me the M code you wrote