Missing authorization Bearer token
See original GitHub issue@satterly
Issue Summary
Accessing to API userinfo get "message": "Missing authorization Bearer token"
Environment
-
OS:
Vagrant alerta-centos7
-
API version:
Alerta API 7.4.4
-
Deployment:
Vagrant
(Modified to use Postgres 11) -
For self-hosted, WSGI environment:
apache/mod_wsgi
-
Database:
Postgres
-
Server config: Auth enabled? No Auth provider? Basic Customer views? No
-
web UI version:
7.4.4
-
CLI version:
alerta client 7.4.0
To Reproduce Steps to reproduce the behavior:
- Use API (by browser or Postman)
- Config Header with
Key demo-key
- Get
{
"code": 401,
"errors": null,
"message": "Missing authorization Bearer token",
"requestId": null,
"status": "error"
}
Context / Final objective I’m creating a plugin for Messagebird.
-
I intend that a new critical alert arrive and a call is made. To get the number I want search if the users are in a group and get the number from the comment field.
-
When a existing alert change severity (not status) from critical to warning or critical to ok, a sms is send to a specific number with the same logic above.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thank you again.
With
/user/:userid/groups
- WorkedWith
/user/:userid
- the json message doesn’t show any field with groups(some info redacted)
Yes users<=>groups is a many-to-many relationship so it has its own endpoint. There is also a
/group/:groupid/users
for the reverse relationship that lists all the users in a group.