Logging Radioplayer V2

I`m trying to set up logging to Radioplayer V2.
But i get this error message:
23.10.2022 02:37:41 Error HTTP call to https://USER:PW@np-ingest.radioplayer.cloud/ failed: HTTP/1.1 401 Unauthorized

When we put all the info in to “Postman” we are able to send Now Playing info to Radioplayer, so the user and password we have should be correct. So with URL and Station UID.
What are we missing?

Using mAirlist v.7.06.

Are Pettersen
Radio Mehamn

Did some more debugging pointing mAirlist to my own server. It seems like mAirlist puts the data in the request body and not in the params as radioplayer v2 seems to require.

Example in postman:

POST /requestlogger/?rpuid=5784152&title=testTitle&artist=testArtist HTTP/1.1
HTTP headers:
Authorization: Basic xxx
User-Agent: PostmanRuntime/7.29.2
Accept: /
Postman-Token: xxx
Host: xxx
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Request body:

Example in mAirList:

POST /requestlogger/ HTTP/1.0
HTTP headers:
Authorization: Basic xxx
Connection: keep-alive
Host: xxx
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent: Mozilla/5.0 (compatible; mAirList/
Request body:rpuid=5784152&startTime=2022-10-23T10%3A29%3A20&duration=10&title=Nemesis+%28Sting+Version%29&artist=Alec+Slayne

Notice the first and last name containing the request and the request body. This is likely what is causing the issue.

1 Like

I just checked the docs again: https://radioplayerworldwide.atlassian.net/wiki/spaces/RPC/pages/1920073729/Programmatic+Ingest+of+Station+Information#Now-Playing-(NP)

In fact, they demand that the parameters are passed as part of the request URL, not the body. Which is actually not how HTTP POST is supposed to be used, and quite a questionable design decision, if you ask me.

The previous Radioplayer v1 API was using the POST requests in the ordinary way, with the parameters in the body. That’s probably why I didn’t pay much attention to that detail when adjusting the code for the new API.

I will change it accordingly and let you know when an update is available.

1 Like

I see there was an update for this on version 7.0.7. But I am now getting “Range check error” on 7.1.3. From the error log:

29.01.2023 23:18:06 Error HTTP call to https://xxx@radioplayer.org:xxx@np-ingest.radioplayer.cloud/?rpuid=xxx&startTime=2023-01-29T22%3A18%3A06&duration=0&title=HELLO&artist=BELL failed: Range check error