Working online for a US company, but from overseas, can I use foreign earned income?

I'm an American and full time employee for a company in the US. However I live, hold residency permits and work online from a foreign country. I've been a resident of that country for the entire year. Do I qualify for foreign earned income credit even though the company is based in the US?