PQ - Building an api JSON query that needs headers
Results 1 to 2 of 2

Thread: PQ - Building an api JSON query that needs headers
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Sep 2005
    Location
    Huntingdon, Cambridgeshire. UK
    Posts
    437
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default PQ - Building an api JSON query that needs headers

    Hi,

    I've had a google of how to do this and have gotten stuck

    I would like to use excel to dl and parse data from www.teamgate.com I have already used the api to connect to klipfolio so I just need to get power query to work !

    My (edited for security) details are :

    GET https://api.teamgate.com/v4/deals?em...=no&limit=1000
    X-App-Key:123123123
    X-Auth-Token:abcabc

    I have tried this

    Code:
    let
    Source = Json.Document(Web.Contents("https://api.teamgate.com/v4/deals?embed=customFields&isDeleted=no&limit=1000",
    [Query = [
    #"X-App-Key" = "123123123",
    #"X-Auth-Token" = "abcabcabc"]]
    ))
    in
        Source
    and also

    Code:
    let
    	
    Source = Json.Document(Web.Contents(https://api.teamgate.com/v4/deals?embed=customFields&isDeleted=no&limit=1000,
         [
             Headers = [#"X-App-Key"="123123123",
                        #"X-App-Token"="abcabcabc",
                        #"Content-Type"="application/json"],
             Content = Text.ToBinary("") 
         ]
     ))
    
    in
        Source

    however I am hit with "access to the resource is forbidden" and requires me to edit credentials. The answer is always Access to the resource is forbidden.

    I have looked a lot of resources, however they always give examples that seem to work :D
    Help !
    Home running XL2013 on Win10
    Work running 365 on Win7

    MOS Excel 2010 Expert - Sep 2015
    MOS Excel 2013 Expert - Feb 2016
    MOS Office 2013 Master - Nov 2016

    www.about.me/AboutCatherine
    https://uk.linkedin.com/in/catparkinson

    Excel is more than a career... it's a life choice !

  2. #2
    Board Regular
    Join Date
    Sep 2005
    Location
    Huntingdon, Cambridgeshire. UK
    Posts
    437
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: PQ - Building an api JSON query that needs headers

    Optimistic bump
    Home running XL2013 on Win10
    Work running 365 on Win7

    MOS Excel 2010 Expert - Sep 2015
    MOS Excel 2013 Expert - Feb 2016
    MOS Office 2013 Master - Nov 2016

    www.about.me/AboutCatherine
    https://uk.linkedin.com/in/catparkinson

    Excel is more than a career... it's a life choice !

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •