Setting up the MageMail API connection to deal with Basic Authentication
When you go to a website and see the following username and password prompt, this is what's called Basic Authentication.
Generally speaking if someone has a development or staging environment (like dev.example.com or test.example.com or staging.example.com), they might have it setup using Basic Authentication.
The API connection won't work unless you take the username and password and embed them in the API URL like this, separated by a colon (:) and with an at symbol (@) before the domain name in the API URL:
Remember that the Basic Authentication username and password are completely different from the MageMail account username/password as well as the MageMail API key/route. You'll generally have to check with the customer to find out what the Basic Authentication username/password are.
Before testing the username and password in the API connection, make sure to test it directly in the web browser. i.e. in the first screenshot above where you see the username/password prompt, just go ahead and enter them in there, hit Log In, and then you should see the website come up. If that doesn't work for you then you don't have the correct Basic Authentication username/password yet.
Once you've put the username and password in the API URL and hit Save, you can hit Test Connection again to see if it works.