Hi, From Azure Function, how I directly use modules within Abp Framework or need to call Micro Service API? To call API, how to get access token for API from Abp Auth Server?
Thanks
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
If you're creating a bug/problem report, please include followings:
- ABP Framework version: v7.1.0
- UI type: Angular
- DB provider: EF Core / MongoDB
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
2 Answer(s)
-
0
Hi,
let me first ask if i got your question right:
You want to call an api of an abp application form an azure function right?
If so, is your azure function written in C#? Because you could use the HttpApi.Client Project to make api calls to your abp project.
In your abp solution there is even a HttpApi.Client.ConsoleTestApp Project that shows how to use the http api client.
To get an auth token you just need to configure the IdentityClient in the appsettings. Then the api client will automaticly get an access token before sending requests to the api.
Kind regards
-
0
The abp sample code that get access token works (https://github.com/bartvanhoey/), I tested that both client credential and resource owner grant type work.