When I inserted some documents into a collection (without an ObjectID) mongoDB adds its own ObjectIDs.
I want to query a document by its unique ObjectID.
<
I think now the API changes to MongoDB\BSON\ObjectID, also you can use [] to denote an array in PHP 5.4+, so it should be:
MongoDB\BSON\ObjectID
[]
$item = $collection->findOne(['_id' => new MongoDB\BSON\ObjectID( idToken )]);
based on Phil's answer.