TimvMechelen
Board Regular
- Joined
- Nov 7, 2016
- Messages
- 121
Hi All,
I'd like to get the spotify web api data from the following link thru Excel PowerQuery web connector: Spotify API link
I created a web query with the following code:
My funcitonGetNamedRange Query code:
When I enter this data thru the PowerQuery web connector, it works perfectly fine. When I close the workbook and re-open it: the Query cannot refresh anymore. I'm getting the following error:
Does somebody have a solution?
Thank you in advance for your help.
I'd like to get the spotify web api data from the following link thru Excel PowerQuery web connector: Spotify API link
I created a web query with the following code:
Power Query:
let
Bron = Json.Document(Web.Contents(functionGetNamedRange("SourceURL"), [Headers=[Accept="application/json", #"Content-Type"="application/json", Authorization="Bearer B.PrivateCode[B][I].[/I][/B]q8tw"]])),
tracks = Bron[tracks],
items = tracks[items],
items1 = items{0},
#"Geconverteerd naar tabel" = Record.ToTable(items1),
#"Alternatieve rijen zijn verwijderd" = Table.AlternateRows(#"Geconverteerd naar tabel",0,3,14),
#"Alternatieve rijen zijn verwijderd1" = Table.AlternateRows(#"Alternatieve rijen zijn verwijderd",3,2,9)
in
#"Alternatieve rijen zijn verwijderd1"
My funcitonGetNamedRange Query code:
Power Query:
let GetNamedRange=(NamedRange) =>
let
name = Excel.CurrentWorkbook(){[Name=NamedRange]}[Content],
value = name{0}[Column1]
in
value
in GetNamedRange
When I enter this data thru the PowerQuery web connector, it works perfectly fine. When I close the workbook and re-open it: the Query cannot refresh anymore. I'm getting the following error:
Even when I'm refreshing the Authorization token, it still doens't work.Authorization Error: The credentials for the source Web invalid. Update the credentials through a refresh operation or in the Data Source Settings dialog box to continue. (Source at https://api.spotify.com/v1/search.)
Does somebody have a solution?
Thank you in advance for your help.