Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AnjaliBJ
Frequent Visitor

Data refreshes in Desktop but not in Service

Hello community,

I succeed getting data from LiveChat by using Web API. The data refreshes in Desktop, but not in Service. I get the following error:

"You can't schedule refresh for this dataset because the following data sources currently don't support refresh:

Data source for LiveChat
Discover Data Sources

Query contains unsupported function. Function name: Web.Contents"

A part of the M script looks like this:

let

    Source = Json.Document(Web.Contents("https://api.livechatinc.com/v2/chats?date_from=" & date_from & "&date_to=" & date_to)),

    #"Converted to Table" = Record.ToTable(Source),

    GetPage = #"Converted to Table"{2}[Value],

              Pages = Table.FromList(List.Generate(

              ()=>GetPage,

              each _ > 0,

              each _ -1),

              Splitter.SplitByNothing(),

              {"Page"},

              null,

              ExtraValues.Error),

    #"Invoked Custom Function" = Table.AddColumn(Pages, "Transcript", each Pagination([Page])),

 

Then I tried to change the M script using RelativePath and Query to:

let

    Source = Json.Document(Web.Contents("https://api.livechatinc.com/",

              [RelativePath="v2/chats",

              Query=[date_from=date_from,date_to=date_to]])),

    #"Converted to Table" = Record.ToTable(Source),

    GetPage = #"Converted to Table"{2}[Value],

              Pages = Table.FromList(List.Generate(

              ()=>GetPage,

              each _ > 0,

              each _ -1),

              Splitter.SplitByNothing(),

              {"Page"},

              null,

              ExtraValues.Error),

    #"Invoked Custom Function" = Table.AddColumn(Pages, "Transcript", each Pagination([Page])),

 

 

And again, in Desktop it refreshes but in Service I get the same error. Can someone help me?

2 REPLIES 2
Anonymous
Not applicable

Based on the error, i would simply assume that it doesn't support refreshing of "live chat".  Looking at your code, i personally use a similar Json(Web.Contents) for an API and have no problems with refreshing.  I'm not using Live Chat, so there could be something causing an issue there.

 

Where there might be some differences:

  1.  I'm using Table.FromList inside my "Converted to Table" row.  It looks like:

 

#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Columns" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"yourSourceColumn1", "yourSourceColumn2", "yourSourceColumn3", "yourSourceColumn4", "yourSourceColumn5"}, {"yourRenamedColumn1", "yourRenamedColumn2", "yourRenamedColumn3", "yourRenamedColumn4", "yourRenamedColumn5"}),​

 

  • Ive loaded this into my Gateway as a connection of "Web"

Thank you for you message. I am wondering if maybe the token part is causing the error. I still haven't found a solution. If I find it I will post it.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.