You will first have to remove the exterior bezel on the taillights – you can do that by removing the silicone around the screws and removing the 2 screws that hold the taillight.
There might not be enough slack on the Tail light wires, you can access them from the inside.
Remove these side panels and you will have access to the wires
Older then 2017: You will need to remove the faceplate underneath the bed, there will be 6 wood screws that hold it on that you will need to remove ..