Is there any official or recommended way to use Azure Communication Services Email with Golang?

Yufan Wang 0 Reputation points
2025-05-03T22:15:01.1166667+00:00

Hi All,

I'm currently exploring the use of Azure Communication Services (ACS) Email for sending transactional emails from an application written in Go (Golang).

I've reviewed the official documentation here: https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/send-email

However, I noticed that the supported SDKs listed are for .NET, Python, Java, and JavaScript. There is no mention of a Go SDK or example of how to interact with ACS Email from Go.

Could you please confirm:

  1. Whether there is an official Go SDK (or one planned) for the ACS Email service?
  2. If not, is there any recommended approach or reference implementation for using the ACS Email REST API directly from a Go application?
  3. Are there any authentication considerations specific to ACS Email when using a custom HTTP client in Go?

Any guidance, links, or pointers would be greatly appreciated.

Thanks!


Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,247 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bhargavi Naragani 6,365 Reputation points Microsoft External Staff Moderator
    2025-05-05T07:08:47.9333333+00:00

    Hi @Yufan Wang,

    You're correct that, as of now, Azure Communication Services (ACS) does not offer an official Go SDK for its Email capabilities. The supported SDKs are currently available for .NET, Java, Python, and JavaScript.

    However, you can still integrate ACS Email into your Go application by directly interacting with the ACS Email REST API. This approach is fully supported and allows you to send transactional emails from your Go applications.

    Since there's no Go SDK, the best path forward is to utilize Go's net/http package or any preferred HTTP client library to construct and send HTTP POST requests to the ACS Email REST API. Authenticate your requests using the ACS Email access key or an Azure Active Directory (Azure AD) token, depending on your security requirements. Email - Send - REST API (Azure Communication)

    Authentication Considerations:

    • If you're using access keys, you need to include the Communication-Services-Access-Key header in your request.
    • If you're using Azure Active Directory (token-based auth), you'll need to acquire a bearer token scoped for https://communication.azure.com/.default and include it in the Authorization header. Authentication for Azure Communication Services

    Hope this information is helpful, let me know if you have any further queries.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.