13
Views
2
Comments
Solved
[Mailgun Email Delivery Service] Getting error - StatusCode :401 Unauthorized","Message":"Failed to deserialize JSON
Question
mailgun-email-delivery-service
Service icon
Forge asset by Stefan Weber
Application Type
Service

Hello, 

While testing the demo application, I am getting the following error 

"StatusCode":401,"StatusLine":"401 Unauthorized","Message":"Failed to deserialize JSON to ErrorWrapper:\nUnexpected character encountered while parsing value: F. Path '', line 0, position 0." 


I have used valid API key and Domain name. and also filled the correct data but still getting error. 

2021-10-09 07-57-44
Stefan Weber
 
MVP
Solution

Hi,

did you configure the correct endpoint for your domain. By default the REST consume endpoint is configured to use https://api.eu.mailgun.net. If your domain is configured in the US zone you have to set the base url (in the IS module) for the REST consume to https://api.mailgun.net.

Best

Stefan



2026-02-12 11-59-45
Sanket Gaikwad

Thanks @Stefan Weber for figuring out the issue.  As my domain is US configured, I have changed the base URL as you mentioned, and it worked.  Emails are getting triggered now. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.