Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-444

Can't get the validate-token API call to work

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • API
    • None

      I'm trying to follow the API documentation for listenbrainz, specifically the validate-token GET request. But I can't get it to work. I tried searching for other issues about the call but couldn't find any.

      I'm attaching a .py file that contains an example of the code I'm trying. Running that script always produces:

      {'code': 400, 'error': 'You need to provide an Authorization token.'}

      Am I making a silly syntax error somewhere? I tried making small modifications on the examples from the docs to minimize areas where I might make a silly mistake, but I can't get this to work.

          [LB-444] Can't get the validate-token API call to work

          amCap1712 added a comment -

          This issue was fixed some time ago and the docs have also been updated accordingly.

          amCap1712 added a comment - This issue was fixed some time ago and the docs have also been updated accordingly.

          Tim Van Holder added a comment - - edited

          Came here for the same reason - figured out I needed to pass the token as a token argument, but found the result ("here is a string, but it's in English and we don't actually document them as official values") less than ideal.

          The pull request addresses both concerns.

          However,

          Tim Van Holder added a comment - - edited Came here for the same reason - figured out I needed to pass the token as a token argument, but found the result ("here is a string, but it's in English and we don't actually document them as official values") less than ideal. The pull request addresses both concerns. However, the pull request does not update the doc to indicate the two new keys, nor does it document the exact strings returned the docs have not actually been regenerated; https://listenbrainz.readthedocs.io/en/latest/dev/api.html#get--1-validate-token still refers to "three codes"

          Param Singh added a comment -

          Hello, sorry for the late response.

           

          This is a problem with our documentation I guess.

           

          You should be sending the token you need to validate as an argument in the GET request (/validate-token?token=token-to-check)

           

          I'll open a pull request to fix the documentation a bit, sorry!

          Param Singh added a comment - Hello, sorry for the late response.   This is a problem with our documentation I guess.   You should be sending the token you need to validate as an argument in the GET request (/validate-token?token=token-to-check)   I'll open a pull request to fix the documentation a bit, sorry!

            Unassigned Unassigned
            sherif Sherif Soliman
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package