Married Adam Jackson and lover Kerry Reeve, both aged 36, were having an affair at the time they consumed the Class A drug while off-duty from their roles in Greater Manchester Police's tactical aid unit.
Images recovered from Jackson's mobile phone also showed the two officers spending the night together at Blackpool Football Club Hotel.
One photograph taken in October 2015 showed snap bags, a bank card and a bottle of Veuve Clicquot champagne on a bedroom table, while another picture taken at the same hotel in November 2016 displayed a line of cocaine across Reeve's breast.
When anti-corruption officers arrested the pair in February 2017 at Reeve's home in Barratt Gardens, Middleton, they found three snap bags of cocaine and one-and-half tablets of Ecstasy in a black holdall that Jackson carried into the address.
Another snap bag containing cocaine was discovered on Reeve's bedside table.
Both officers denied being concerned in supply of cocaine and Reeve claimed she was unaware of the drugs being carried by Jackson.
Samples of Reeve's hair were taken which tested positive for traces of cocaine but the defendant argued the results could be explained by her involvement in "numerous drug raids".
She denied asking Jackson for cocaine and claimed her requests were for her favourite drink of champagne.
Reeve also suggested that Jackson sent her photographs of flour made to look like cocaine as "banter", the court heard.
Sentencing her to 31 weeks in jail, Judge Michael Leeming said she had done her utmost to not accept responsibility in prepared statements to the police before she pleaded guilty in May to encouraging Jackson to obtain and supply cocaine to her on two occasions.
Jackson, of Tong Lane, Bacup, was jailed for 18 months after he admitted encouraging the supply of cocaine on at least 20 occasions between November 2015 and February 2017, and also possessing cocaine and ecstasy.
Alex Langhorn, prosecuting, said Jackson requested cocaine from November 2015 on an almost weekly basis from his friend, Daniel Wade, who obtained the drug from a number of street dealers, including Callum Wood and John Pounder.
He continued: "At about the same time Pc Jackson entered into an extra-marital affair with a colleague, Pc Kerry Reeve.
While it is clear that both were using cocaine throught the period covered by this indictment, in early 2017 Pc Reeve began to ask and encourage Pc Jackson to obtain cocaine and supply it on to her."
In one message, Reeve texted Jackson: "Any news on Friday's package yet? I well wanna get on it", to which Jackson replied: "I'm ringing him later so I'll chase him up ... I'm not doing overtime on Saturday. I'll be too f***ed but I'll do Sunday even tho I really don't want to haha xxx."
Michael Lavery, defending Jackson, said it was a personal tragedy for his client that he had fallen into this type of behaviour and as a consequence has lost his dream job.
He said: "He found the stresses of being a police officer quite difficult. That is one of the reasons why he turned to cocaine as a crutch."
Jackson was now drug free, had qualified as a HGV driver and was rebuilding his marriage, Mr Lavery added.
The judge noted that, like Reeve, Jackson seemed to blame his employers for being "unsupported at work".
Judge Leeming told him: "You have a difficult job, everyone accepts that, but it does not give you a licence to turn to Class A drugs to relax.
"You gave no thought that your performance at work might be adversely affected or the effect this might have on the police or indeed public confidence in the police."
In mitigation, Ricky Holland said Reeve - who joined GMP in 2001 - was a casual user of cocaine whose "shame and embarrassment is indisputable".
Wade, 36, of Laneside Road, Haslingden, Lancashire, was jailed for two years for offering to supply cocaine on 40 occasions.
Wood, 28, of Catlow Hall Street, Oswaldtwistle, Lancashire, was sentenced to 41 months in jail for offences of supplying and offering to supply cocaine.
Pounder, 31, of Cedar Avenue, Haslingden, received a sentence of 38 months' imprisonment for supplying and possession with intent to supply cocaine.
In a statement, Greater Manchester Police said Jackson and Reeve would regularly take cocaine on nights out, in hotel rooms and "other secret locations".
The pair did not realise they were being covertly filmed by the force's anti-corruption unit which was gathering evidence against them.
Both officers were suspended following their arrest and later resigned when they entered their guilty pleas.
Chief Superintendent Annette Anderson, head of GMP's Professional Standards Branch, said: "As serving police officers, Jackson and Reeve fell way below the standards expected and were complete hypocrites carrying out their duties all the while knowing they themselves were committing criminal offences."