element-hq / element-hq/dendrite
Access forbidden when trying to access `/_matrix/client/r0/account/whoami` as an AS user
- Dominant language
- Go
- Stars
- 965
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
*This issue was originally created by [**@alistair23**](https://github.com/alistair23) at .*
### Background information
- **Dendrite version or git SHA**: a85051ca9de82756a94f1ea6870de9bd140a6b20
- **Monolith or Polylith?**: Monolith
- **SQLite3 or Postgres?**: Postgre
- **Running in Docker?**: No
- **`go version`**: go1.15.6 linux/amd64
### Description
When attempting to use the [WhatsApp bridge](https://github.com/tulir/mautrix-whatsapp) I see this error from the bridge
```
[ERROR] Failed to connect to homeserver: failed to GET /_matrix/client/r0/account/whoami: 502 Bad Gateway. Retrying in 10 seconds...
[ERROR] Failed to connect to homeserver: failed to GET /_matrix/client/r0/account/whoami: M_FORBIDDEN (HTTP 403): appservice has not registered this user. Retrying in 10 seconds...
...
```
It seems like `/_matrix/client/r0/account/whoami` is not implemented.
### Steps to reproduce
- Setup the WhatsApp bridge, steps here: https://github.com/tulir/mautrix-whatsapp/wiki/Bridge-setup
- Set the `app_service_api` `config_files` section to point to the registration file.
- Try to start the `mautrix-whatsapp`
Contributor guide
Research direction
Start by reproducing the WhatsApp bridge request to /_matrix/client/r0/account/whoami with the app_service_api registration file configured, then trace the endpoint's handling of application-service users. Done means the request no longer returns M_FORBIDDEN for a registered AS user and the bridge can connect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100