question

philipp-weder avatar image
philipp-weder asked

successfull login but invalid token

I managed to log in to the API using my credentials and I have received a token.

(Indeed, as has been pointed out in previous posts, if one uses Postman, one has to include the credentials in the body of the request. Their Authentification tab does not work!)

However, if now, I want to do a basic request using the Bearer token, e.g.

https://vrmapi.victronenergy.com/v2/users/xxxxxx/installations

setting the header

X-Authorization: "token"

I receive the follwing error message

{
"success": false,
"errors": "No valid authentication scheme sent",
"error_code": "invalid_token"
}

How is this possible?


PS: I have also tried the Authentication option provided by Postman to set the Bearer token an it does not work either.



VRM
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
Teun Lassche avatar image
Teun Lassche answered ·

Hi!


You are missing 'Bearer' before the token, as described here:

https://docs.victronenergy.com/vrmapi/overview.html#login

X-Authorization: Bearer {token}
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

big-blue avatar image
big-blue answered ·

Sorry, i was lost in different threads. The first response should fix your issue.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

lillian avatar image
lillian answered ·

If you're trying to reset your password and you receive an error citing an “invalid token” or asking you for your token, it's likely that the link you clicked on to reset your password has expired. ... A token is a one-time generated link that contains numbers and letters that'll allow you to reset your password.

DGCustomerFirst

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.