I was detained in the customs and not granted to enter.
准许入境用 grant
你被海关扣住了,当然是在海关里面,所以用in.用by也可以,意即被海关扣住了.用on似乎不对.