Posts

Showing posts with the label Rest Api In Business Central

How To do Hashing HMAC RSA 1 algorithm or cryptography in Microsoft Business Central | AL Code

HMAC RSA-1 Hashing In AL code | Cryptography Management in Business Central | O AUTH 1.0 Signature Making in Business Central I came up to an requirement of consuming Rest api with O Auth 1.0 authentication in Business Central AL Code and ended up on a point where i have to do some hashing with some defined algorithm to make signature key for my request...  ðŸ˜’ Don't be upset with my story simple is that just do cryptography just by passing your text and password and algorithm of your choice. Read more for the available functions available as cryptography management Code Unit in BC | AL action( hash )  { ApplicationArea = All;     trigger  OnAction ()       var      CryptographyManagement:  Codeunit  "Cryptography Management";      HashAlgorithmType:  Option  MD5,SHA1,SHA256,SHA384,SHA512;   begin      Message ( 'Decrypt %1' ,...

Consume Rest API in Business Central Code with Basic Auth

 Rest API Call With Basic Auth | Woo Commerce Rest API So i was working on some requirement of pushing products directly form Microrosft Business Central  to E-Commerce side i.e WOO-Commerce. so what we need is to consume the woo side API's into our AL code (BC SIDE) that requires the basic auth in case of https authentication. Here is a glimpse of code for understanding or picking some approach for the others seeking something like that in Business Central.   action( UnixTimestamp )             {                 ApplicationArea = All;                  trigger  OnAction ()                  var            ...

How to get nonce for rest Api call in Business Central AL Code.

How To Create Nonce for Rest API Call In Business Central Nonce is a random piece of string generated every time for web services call that require nonce in their header part i.e O Auth 1.0 uses nonce to be included in their header request, each time they are random and different for the call purpose. Scenario : I need the same random alphanumeric piece of string for the call so what i did was to use a  CREATEGUID, copystr and  DELCHr  methods already included in Business Central side. For detail please read Microsoft Documentation to be clear about methods used . 💥💪 trigger  OnAction ()                  begin                     RandomDigit  :=  CREATEGUID;                     Ra...