This paper describes a set of experiments in which an upper-torso humanoid robot learned to slide a card through a card reader. The small size and the flexibility of the card presented a number of manipulation challenges for the robot. First, because most of the card is occluded by the card reader and the robot's hand during the sliding process, visual feedback is useless for this task. Second, because the card bends easily, it is difficult to distinguish between bending and hitting an obstacle in order to correct the sliding trajectory. To solve these manipulation challenges this paper proposes a method for constraint detection that uses only proprioceptive data. The method uses dynamic joint torque thresholds that are calibrated using the robot's movements in free space. The experimental results show that using this method, the robot can detect when the movement of the card is constrained and modify the sliding trajectory in real time, which makes solving this task possible.