Quantcast
Channel: All Power Query posts
Viewing all articles
Browse latest Browse all 122408

Re: Connect to restful api data source multiple times

$
0
0

Hi Lydia,

 

Thanks for getting back to me, the thing is though in order to get the token you have to first POST to the api. 

 

Its like a two step authentication.  How would this translate?

 

let
     apiUrl = "https://api.secondstreetapp.com/sessions",
     options = [Headers =[#"username"="***"],[#"password"="****"]],
     result = Web.Contents(apiUrl , options)
in
     result

 

When I put in the above I get Access to the resource is forbidden and then taken to a login screen, what I am needing it to return is...

 

{
 "sessions": [
   {
     "access_token": "a1b2c3d4",
     "id": 22318,
     "organization_id": 397282,
     "organization_user_guid": "123456a7-ab12-1a23-1ab2-123a45bc6789",
     "organizations_count": 2,
     "username": "user@example.com"
   }
 ]
}

 

Thanks

 

Chris


Viewing all articles
Browse latest Browse all 122408

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>