Forum Discussion

EDO_01_1789's avatar
EDO_01_1789
Helper I
4 years ago

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

  • JirkaZ's avatar
    JirkaZ
    Solution 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)

  • 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

    • JirkaZ's avatar
      JirkaZ
      Solution 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_1789's avatar
        EDO_01_1789
        Helper 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