<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Get data using web API to Power BI - Token Prefix Missing in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3557169#M45522</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm new to Power BI and I've been trying to connect data using API with Authentication in Get Data - WEB. I keep on getting "Token Prefix Missing" error.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've tried all the steps I saw from the googel (use Basic, Advance - with/without Authorization in the header, add api key to username)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The API URL with the Bearer token works fine in Postman, so I'm really not sure why it is not connecting in Power BI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can someone help me please.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":crying_face:"&gt;😢&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chris05_0-1701198591511.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1003472i6A64E34FA9839032/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chris05_0-1701198591511.png" alt="chris05_0-1701198591511.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 19:16:51 GMT</pubDate>
    <dc:creator>chris05</dc:creator>
    <dc:date>2023-11-28T19:16:51Z</dc:date>
    <item>
      <title>Get data using web API to Power BI - Token Prefix Missing</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3557169#M45522</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm new to Power BI and I've been trying to connect data using API with Authentication in Get Data - WEB. I keep on getting "Token Prefix Missing" error.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've tried all the steps I saw from the googel (use Basic, Advance - with/without Authorization in the header, add api key to username)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The API URL with the Bearer token works fine in Postman, so I'm really not sure why it is not connecting in Power BI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can someone help me please.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":crying_face:"&gt;😢&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chris05_0-1701198591511.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1003472i6A64E34FA9839032/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chris05_0-1701198591511.png" alt="chris05_0-1701198591511.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 19:16:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3557169#M45522</guid>
      <dc:creator>chris05</dc:creator>
      <dc:date>2023-11-28T19:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get data using web API to Power BI - Token Prefix Missing</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3560365#M45555</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/652658"&gt;@chris05&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Perhaps you can take a look at the following blog about use web connector with optional parameters usages if it help for your scenario:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/" target="_self"&gt;Using The RelativePath And Query Options With Web.Contents() In Power Bi&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 07:15:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3560365#M45555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-30T07:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get data using web API to Power BI - Token Prefix Missing</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3562665#M45577</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;Do you know what type of API you try to connect to?&lt;/P&gt;&lt;P&gt;I never get the Get Data - Web to work, in my case it has been REST-API with credentials and token a&lt;SPAN&gt;uthorization&lt;/SPAN&gt;. If its the same case for you, you will have to start with a Get Data - Blank Query and then write code were you pass your credentials and token to the API.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You also need the API documentation to be able to see how and where the token and credentials should be passed.&lt;/P&gt;&lt;P&gt;Hope it can help you on your path to find the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 08:35:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3562665#M45577</guid>
      <dc:creator>Karltomm</dc:creator>
      <dc:date>2023-12-01T08:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get data using web API to Power BI - Token Prefix Missing</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3566915#M45636</link>
      <description>&lt;P&gt;Hi Karl,&lt;BR /&gt;Thank you for your reply!&lt;BR /&gt;The API I'm trying to connect is from Ceipal (this is an applicant tracking system used for recruiting). The API documentation can be downloaded for each report that I will need from the site. I'm not really sure how to know the type of their API but as per their API documentation I have the below details&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;API NAME : &lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Authentication Url : &lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Username : &lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Password : &lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Auth Key : &lt;/STRONG&gt;&amp;nbsp;{api_key&lt;STRONG&gt;:&lt;/STRONG&gt;}&lt;BR /&gt;&lt;STRONG&gt;Format : &lt;/STRONG&gt;&amp;nbsp;{json&lt;STRONG&gt;:&lt;/STRONG&gt;1} &amp;nbsp;(0 for xml format)&lt;BR /&gt;Generate authtoken using this authentication and use this auth token to get the access for below API.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Authenticaiton type : &lt;/STRONG&gt;&amp;nbsp;bearer token&lt;BR /&gt;&lt;STRONG&gt;token : &lt;/STRONG&gt;&amp;nbsp;Token generated from authentication&lt;BR /&gt;&lt;STRONG&gt;Method : &lt;/STRONG&gt;&amp;nbsp;GET&lt;BR /&gt;&lt;STRONG&gt;Endpoint URL :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 19:18:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3566915#M45636</guid>
      <dc:creator>chris05</dc:creator>
      <dc:date>2023-12-04T19:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get data using web API to Power BI - Token Prefix Missing</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3566919#M45637</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I'll be checking this! Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 19:19:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3566919#M45637</guid>
      <dc:creator>chris05</dc:creator>
      <dc:date>2023-12-04T19:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get data using web API to Power BI - Token Prefix Missing</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3567799#M45647</link>
      <description>&lt;P&gt;Here is an example code I made for one API, the challenge I think is to understand what the API wants in the Headers and Body information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is first step to get the Token, then you will need to use the token in a second call to the API where you GET the data you want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;urlLogin="???",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Body information with credential in this case&lt;BR /&gt;body = "{&lt;BR /&gt;""License"": ""??"",&lt;BR /&gt;""UserName"": ""??"",&lt;BR /&gt;""Password"": ""??"",&lt;BR /&gt;}",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Create a JSON request to past to API&lt;BR /&gt;Parsed_JSON = Json.Document(body),&lt;BR /&gt;BuildQueryString = Uri.BuildQueryString(Parsed_JSON),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Send and recive a replay inclusive the Access token.&lt;BR /&gt;GetTokenRecord = Json.Document(Web.Contents(urlLogin,[Headers = [#"Content-Type"="application/json",#"Accept"= "application/json"], Content = Text.ToBinary(BuildQueryString)])),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Pick the token from the record, in this case the record was called Token in the table from the API.&lt;BR /&gt;token = GetTokenRecord[Token],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Create the access token with Bearer in front if needed&lt;BR /&gt;access_token = "Bearer "&amp;amp;token,&lt;/P&gt;&lt;P&gt;in&lt;BR /&gt;access_token&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 07:28:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-data-using-web-API-to-Power-BI-Token-Prefix-Missing/m-p/3567799#M45647</guid>
      <dc:creator>Karltomm</dc:creator>
      <dc:date>2023-12-05T07:28:45Z</dc:date>
    </item>
  </channel>
</rss>

