Hello!
I currently have a connection working with Postman. A new Access Token with OAuth2 has to be generated first before inserting the Json to send a request with POST and receive the right response.
I would like to replicate/integrate this behaviour in Business Central instead of Postman. How could I do this exactly?
I tried to read myself into API's but the example from Erik Hougaard didnt work for me, as the IP isnt showing.
How to make a simple API call with a json reply in Business Central - YouTube
So what you want to do is to call an external API from with in Business Central?
if that is what you are looking for you have to write AL code and use the http client available in the AL language.
Thank you for the answer but I should have clarified that I wanted to establish the connection independent from Postman. Starting the connection works with postman, but the user should be able to send the request by himself with business central and receive the response without using postman.
To hit your codeunit service you have to use base OData URL provided by microsoft..
api.businesscentral.dynamics.com/.../MyCodeUnit_Hello
Hope it helps..
Regards
Hi,
You can create a custom procedure in your codeunit and then create a web service for that codeunit, you can hit the procedure of your codeunit using postman... here's the simple code unit with procedure..
To create the web service, you can search for 'web services'...
After creating the web service, you can call the procedure called 'Hello' using postman..
hope it helps you...
Regards
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156