Downloading Data into Excel with Power Query

It looks like some people have managed to achieve this using an authorisation code. I have the code already but am struggling to get it to connect and bring back data. Has anyone managed this who can help?