1
0
forked from baron/baron-sso

SMS API 전화번호 형식 오류 수정

This commit is contained in:
2026-01-16 10:12:02 +09:00
parent bea549c899
commit c6ef9b4393

View File

@@ -43,6 +43,9 @@ func (s *SmsServiceImpl) SendSms(to, content string) error {
apiURL := fmt.Sprintf("https://sens.apigw.ntruss.com/sms/v2/services/%s/messages", s.serviceID)
log.Printf("Requesting SENS API URL: %s", apiURL)
// Naver SENS API requires phone number without '+'
sanitizedTo := strings.Replace(to, "+", "", 1)
reqBody := domain.NaverSmsRequest{
Type: "SMS",
ContentType: "COMM",
@@ -51,7 +54,7 @@ func (s *SmsServiceImpl) SendSms(to, content string) error {
Content: content,
Messages: []domain.SmsMessage{
{
To: to,
To: sanitizedTo,
},
},
}