Can we make an external api call in keycloak files

hi team,

I want to call an external api and fetch a list of countries in register.ftl file of kyecloak server that belongs to my project.
Is it even possible?

Yes you can definitely call api from your keycloak server. You can use HttpClientProvider and use it for api calls.