Skip to content

Commit

Permalink
Support requesting recordings for Twilio with basic auth
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Jun 30, 2023
1 parent 491828f commit 5929c49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/ivr/twiml/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ func NewService(httpClient *http.Client, accountSID string, authToken string) iv
}

func (s *service) DownloadMedia(url string) (*http.Response, error) {
return http.Get(url)
req, _ := http.NewRequest(http.MethodGet, url, nil)
req.SetBasicAuth(s.accountSID, s.authToken)
return http.DefaultClient.Do(req)
}

func (s *service) CheckStartRequest(r *http.Request) models.CallError {
Expand Down

0 comments on commit 5929c49

Please sign in to comment.