Dynamics 365 Integration
Generate high-quality barcodes directly within your D365 environment using our secure Cloud API.
Obtain Your Credentials
After your purchase, you received a Client ID and a Client Secret via email. When requesting a token, ensure you include the barcode:generate scope.
POST https://www.barcodesoft.com/api/auth/token
Configure Power Automate (Recommended)
The easiest way to integrate with Dynamics 365 is via a Power Automate Flow. This allows you to automate barcode generation across Dataverse entities.
- Trigger: When a row is added or modified (Dataverse).
- Action: HTTP Request to
/api/auth/tokento get the Access Token. - Action: HTTP Request to
/barcode/v1/qrcodewith the Bearer token in the Header.
AL Code Implementation (Business Central)
Use the following snippet to handle authentication and barcode generation within Business Central:
// 1. Get OAuth Token with Scope
HttpClient.DefaultRequestHeaders.Add('Accept', 'application/json');
Content.WriteFrom('{"grant_type":"client_credentials","client_id":"YOUR_ID","client_secret":"YOUR_SECRET","scope":"barcode:generate"}');
if HttpClient.Post('https://www.barcodesoft.com/api/auth/token', Content, Response) then begin
Response.Content.ReadAs(ResponseText);
end;
HttpClient.DefaultRequestHeaders.Add('Authorization', StrSubstNo('Bearer %1', AccessToken));
if HttpClient.Get('https://www.barcodesoft.com/barcode/v1/qrcode/?data=Testing&isgs1=false&width=360&height=150&imageformat=svg', Response) then begin
end;
Display the Barcode
The API returns an image stream (PNG/JPG/SVG). In D365 Sales, store the response in an Image column. In Business Central, use TempBlob to stream the data into a Media or Blob field.
Need technical assistance?
Our engineering team can help with custom AL, C#, or PowerPlatform implementations.
← Back to Cloud Barcode API Main Page