An Implementation to the BeeFree.io email editor. Please visit http://www.beefree.io/ for more information.
$beefree = new BeeFree([client_id], [client_secret]);
$result = $beefree -> getCredentials();
After the credentials are recieved, implement them in your javascript application.