2

I am creating a REST API that need to access an external REST API. Calls to external API require an auth token to be included in the HTTP headers. They are using Google Firebase as the authentication backend. We have been given a username and a password to sign in.

I don not have much experience in using external authentication for API using .NET Core(6).

Please can someone provide me a sample solution (in .NET 6 and C#) that will help me to obtain an auth token using REST API and some samples of how to access endpoints passing in the token?

Chint
  • 23
  • 3
  • I think in your Api, you can use Httpclient to access an external api, In Httpclient, you can add an auth token. Refer to [link](https://stackoverflow.com/questions/14627399/setting-authorization-header-of-httpclient) – Xinran Shen May 19 '22 at 09:19

0 Answers0