First, do you have a safe place to be? That's an immediate concern and need.

I'd imagine your boyfriend is more angry about the fact you lied...trust lost is a biggie with those who love the addicted. It's too late to correct that now, but you can correct your manner of thinking.

At the moment you are focused on two things, one you didn't use all of the drug you purchased and you put it where he could find it. This is only half way measures, the lie that isn't a lie.

You really need to give him a bit of time to cool down, get his emotions under control...and you need to be honest with yourself as well as him. You're texting begging to be allowed to go home, yet you aren't owing up to your mistake and may be making promises you may or may not have made before, promises you may not be able to keep. Take some time to settle yourself down and put together a sensible statement, owning your mistakes, confessing your lie and your reasons behind it...to yourself first, then perhaps address it to him.

I understand you wanting to go home...but I also understand that you have torn down what trust you and he had once again built between you...it's going to take twice as much work and be twice as hard as it was in the days before your latest use...so maybe you should be working on yourself before you work on your relationship.