The pilgrim credential currently needed to sleep in albergues de peregrinos on the Camino de Santiago has a long history. Debra Birch, in her Pilgrimage to Rome in the Middle Ages, cites a number of documents transcribed in the vast collection of Germanic manuscripts known as the Monumenta Germaniae Historica. Here are references to some of them, all 9th-century, on the online version at the Bavarian State Library, all in the Leges section.
The Council of Chalons-sur-Saône in 813, amongst various other complaints, noted that there were numbers of pilgrims who journeyed in the false spirit or with false intentions. For this reason, the Council of Aachen in 816 (XLVIIII) restated that no pilgrim could be received (in a hospitium) without a letter of commendation. Haito, bishop of Basel, also notes that all pilgrims should be properly confessed before leaving home.
So, the purpose of the letter of credentials was to establish that this particular traveller had been confessed and was journeying in the right spirit as a bona-fide pilgrim. There are several standard pilgrim's letters reproduced in formularies in MGH, including one from the Formulae Salzburgenses. This certifies the bearer as being en route to pray at the tomb of the blessed apostles Peter and Paul, and calls on all those who 'love and fear God' to grant him (and more likely than not it was a 'him') 'free passage' and 'hospitium', citing Matthew 25:35.