MailGun 401 response forbidden where am i going wrong MailGun 401 response forbidden where am i going wrong curl curl

MailGun 401 response forbidden where am i going wrong


These little things you forget can drive you nuts.

curl_setopt($curl, CURLOPT_USERPWD, 'key-mailgunkey'); 

shoud be prefixed with "api:" as follows

curl_setopt($curl, CURLOPT_USERPWD, 'api:key-mailgunkey'); 

and that was the difference that broke the camels back