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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jessimica1018
Helper II
Helper II

Vonage API connection

Hey all!! 

I have met my match, I am not the greatest at API's and this is beyond my knowledge so I am hoping to get a bit of assistance. 

I am setting up a dataflow in a workspace that is connected to an Azure Data Lake. When I have Power Query open, I can see the data and in postman it connects just fine but when I setup a refresh I get the following error:
"Error: Credentials not found for data source '<ccon>{"Kind":"Web" "Path":"https://api.vonage.com/t/vbc.prod/reports/v1" "NormalizedPath":"https://api.vonage.com/t/vbc.prod/reports/v1" "IsDefaultForKind":false}</ccon>'.. Param1 = <ccon>{"Kind":"Web" "Path":"https://api.vonage.com/t/vbc.prod/reports/v1" "NormalizedPath":"https://api.vonage.com/t/vbc.prod/reports/v1" "IsDefaultForKind":false}</ccon> Request ID: a1563c1b-2c95-44c5-a5e9-73570c4046b9."


Power Query:  

let
maxPage = 500,

Pagination = (page) =>
let
Source = Web.Contents(
"https://api.vonage.com/t/vbc.prod/reports/v1",
[
Headers = [
Authorization = "Bearer <token>"
],
RelativePath = "/accounts/<account ID>/call-logs" & "?start:gte=" & Text.From(Start) & "&start:lte=" & Text.From(End) & "&page_size=10000&order=asc&page=" & Text.From(page)
]
),
doc = Json.Document(Source),
results = try doc otherwise null
in
results,

AllData = List.Generate(
() => [i = 1, response = Pagination(i)],
each [i] <= maxPage and ([response][_embedded][call_logs] <> null and not List.IsEmpty([response][_embedded][call_logs])),
each [i = [i] + 1, response = Function.InvokeAfter(() => Pagination(i), #duration(0, 0, 0, 0))]
),

#"Converted to Table" = Table.FromList(AllData, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"i", "response"}, {"i", "response"}),
#"Expanded response" = Table.ExpandRecordColumn(#"Expanded Column1", "response", {"page_size", "page", "total_items", "total_page", "_embedded", "_links"}, {"page_size", "page", "total_items", "total_page", "_embedded", "_links"}),
#"Removed columns" = Table.RemoveColumns(#"Expanded response", {"i", "_links", "total_page", "total_items", "page", "page_size"}),
#"Expanded _embedded" = Table.ExpandRecordColumn(#"Removed columns", "_embedded", {"call_logs"}, {"call_logs"}),
#"Expanded call_logs" = Table.ExpandListColumn(#"Expanded _embedded", "call_logs"),
#"Expanded call_logs 1" = Table.ExpandRecordColumn(#"Expanded call_logs", "call_logs", {"id", "in_network", "international", "from", "to", "direction", "length", "start", "end", "charge", "rate", "destination_device_name", "source_device_name", "destination_user_full_name", "destination_user", "destination_sip_id", "destination_extension", "source_user_full_name", "source_user", "custom_tag", "source_sip_id", "source_extension", "result", "recorded"}, {"id", "in_network", "international", "from", "to", "direction", "length", "start", "end", "charge", "rate", "destination_device_name", "source_device_name", "destination_user_full_name", "destination_user", "destination_sip_id", "destination_extension", "source_user_full_name", "source_user", "custom_tag", "source_sip_id", "source_extension", "result", "recorded"}),
#"Changed column type" = Table.TransformColumnTypes(#"Expanded call_logs 1", {{"id", type text}, {"in_network", type text}, {"international", type text}, {"from", type text}, {"to", type text}, {"direction", type text}, {"length", type text}, {"start", type text}, {"end", type text}, {"charge", type text}, {"rate", type text}, {"destination_device_name", type text}, {"source_device_name", type text}, {"destination_user_full_name", type text}, {"destination_user", type text}, {"destination_sip_id", type text}, {"destination_extension", type text}, {"source_user_full_name", type text}, {"source_user", type text}, {"custom_tag", type text}, {"source_sip_id", type text}, {"source_extension", type text}, {"result", type text}, {"recorded", type text}}),
#"Replaced errors" = Table.ReplaceErrorValues(#"Changed column type", {{"id", null}, {"in_network", null}, {"international", null}, {"from", null}, {"to", null}, {"direction", null}, {"length", null}, {"start", null}, {"end", null}, {"charge", null}, {"rate", null}, {"destination_device_name", null}, {"source_device_name", null}, {"destination_user_full_name", null}, {"destination_user", null}, {"destination_sip_id", null}, {"destination_extension", null}, {"source_user_full_name", null}, {"source_user", null}, {"custom_tag", null}, {"source_sip_id", null}, {"source_extension", null}, {"result", null}, {"recorded", null}})
in
#"Replaced errors"

 

 

I also think I need to setup a token refresh, I don't think that is necessarily the issue but just another piece I am not 100% sure on. 

 

What am I missing? 

 

Thank you!! 

 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

lose the leading /  on the RelativePath and put the Query attributes into their own place.

 

Web.Contents - PowerQuery M | Microsoft Learn

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

lose the leading /  on the RelativePath and put the Query attributes into their own place.

 

Web.Contents - PowerQuery M | Microsoft Learn

It's always the small things... Thank you so much!! 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.