I have been trying to get data using JSON for my Excel sheet. My code is below:
`let
#"apiUrl" = "https://www.goldapi.io/api/price/",
#"options" = [Headers=[#"x-access-token" = "goldapi-33urttkxxnt3tr-io", #"Content-Type"="application/json"]],
#"result" = Web.Contents(#"apiUrl", #"options")
in
#"result"`
I get the following error: Web.Contents failed to get contents from 'https://www.goldapi.io/api/price/latest' (400): Bad Request
What am I missing here? I have tried to follow all instructions that the website gave me to access the content.
Your help would be appreciated!
CodePudding user response:
Are you sure /api/prices is valid request?
I tried https://www.goldapi.io/api/XAU/USD and works fine.

