HSP Authentication Issues

34 views
Skip to first unread message

william tiffin

unread,
Feb 19, 2026, 1:27:29 PM (22 hours ago) Feb 19
to A gathering place for the Open Rail Data community
Hey All,
I was just wondering if anyone had managed to authenticate with the HSP API? I have been adding in my auth header in the form Authentication: Basic {Base64("email:password")} like it says in the documentation, however, every response I get is a 401 error with this as the error body:

<body>
    <h1>HTTP Status 401 - No AuthenticationProvider found for
        org.springframework.security.authentication.UsernamePasswordAuthenticationToken</h1>
    <div class="line"></div>
    <p><b>type</b> Status report</p>
    <p><b>message</b> <u>No AuthenticationProvider found for
            org.springframework.security.authentication.UsernamePasswordAuthenticationToken</u></p>
    <p><b>description</b> <u>This request requires HTTP authentication.</u></p>
    <hr class="line">
    <h3>Apache Tomcat/8.0.30</h3>
</body>

This to me reads as an API error. I was wondering if anyone had seen this or knows of a way to address it?
Thanks

Peter Hicks

unread,
Feb 19, 2026, 1:38:51 PM (22 hours ago) Feb 19
to openrail...@googlegroups.com

On Thursday, 19 February 2026 at 18:27, william tiffin <serpen...@gmail.com> wrote:

I was just wondering if anyone had managed to authenticate with the HSP API? I have been adding in my auth header in the form Authentication: Basic {Base64("email:password")} like it says in the documentation...

Are you literally setting the authentication header to 'Basic {Base64("email:password")}'?  If so, that's wrong - you need to concatenate your email address, a ":" and your password and then Base64-encode it before setting the Authentication header.

For example:

Authentication: Basic Y29uZ3JhdHVsYXRpb25zQHNvbWVib2R5LmhhZC50bzpkZWNvZGUtdGhpcy1zdHJpbmcK


Peter

william tiffin

unread,
Feb 19, 2026, 1:45:48 PM (22 hours ago) Feb 19
to A gathering place for the Open Rail Data community
Hi Peter,
Thanks for the response
Yes I am setting it to a base 64 encoded concatenation like it says in the documentation. When there is a misconfigured Auth token a different error is thrown. 
<body>
    <h1>HTTP Status 401 - Failed to decode basic authentication token</h1>

    <div class="line"></div>
    <p><b>type</b> Status report</p>
    <p><b>message</b> <u>Failed to decode basic authentication token</u></p>

    <p><b>description</b> <u>This request requires HTTP authentication.</u></p>
    <hr class="line">
    <h3>Apache Tomcat/8.0.30</h3>
</body>

So I am fairly certin the token I am sending is in the correct format. I have also tried with both email and account username but both return the same error.
Thanks

David Wheatley

unread,
Feb 19, 2026, 7:16:23 PM (17 hours ago) Feb 19
to openrail...@googlegroups.com
Hi William,

Is the header not supposed to be Authorization rather than Authentication? That seems to be what the docs say.

Cheers,
David

--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/openraildata-talk/206cea48-fd1c-4899-a60c-1314db7d2c69n%40googlegroups.com.

william tiffin

unread,
3:36 AM (8 hours ago) 3:36 AM
to openrail...@googlegroups.com
Hi David,
Sorry I mistyped my origional post. am setting it to Authorization but unfortunately still no luck. Im thinking there may be another way to autenticate?
Thanks,
Will

You received this message because you are subscribed to a topic in the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openraildata-talk/NOlMr6OW03A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openraildata-t...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/openraildata-talk/CAGZsNigD_FKybRAM9L1%2B60i587ANczKkvR0unq7x%3D5w-GLR3Hw%40mail.gmail.com.

Ryan Woolies

unread,
4:49 AM (7 hours ago) 4:49 AM
to A gathering place for the Open Rail Data community
Hi,

I remember struggling with HSP set up.
In my code I left myself this note:
"// Credentials are set up via https://opendata.nationalrail.co.uk/user even though using RDG endpoint!"

That worked for me but may not be the correct solution for all!
Ryan

william tiffin

unread,
5:25 AM (6 hours ago) 5:25 AM
to A gathering place for the Open Rail Data community
Hi,
Thank you so much that was definately the issue I was having! I must have just skipped over that in the documentation!
Will

Reply all
Reply to author
Forward
0 new messages