1

I have one API call named getAccountId(accessToken):

Here i get the AccountId when i make the HTTP call,

getAccountId(accessToken){
  console.log(accessToken);
   this.http.get('https://api.stackexchange.com/2.2/access-tokens/'+ accessToken)
  .subscribe(data => {
       console.log(data.json().items[0].account_id)
   },
       error=>console.log(error)
    );
}

Using this AccountId I want to make another HTTP call to this API passing AccountId in it, this gives the UserId:

https://api.stackexchange.com/2.2/users/'+ AccountId +'/associated

Using this UserId I make Another HTTP get Request to get the the user details.

https://api.stackexchange.com/2.2/users/'+ UserId +'?order=desc&sort=reputation&site=stackoverflow

The problem here, How to make this calls in a nested format so that finally i get user Details?

Samson Maben
  • 310
  • 2
  • 4
  • 15

0 Answers0