Hi there!
Summary
I'm trying to submit a post via the REST API.
I am able to authenticate.
However, when trying to submit the post, I get a the error "You do not have the appropriate permissions".
Steps to reproduce
I'm using Mattermost preview version 3.4.0 running in Docker.
My request is the following:
Request URL:
http://localhost:8065/api/v3/teams/teem1/channels/upmx6ed7f7b3dmazncjzmoaric/posts/create
Request body:
{"user_id":"dm1","message":"First test 12345.","channel_id":"upmx6ed7f7b3dmazncjzmoaric"}
Expected behavior
I expect a response with status code 200 and the message should be added to the message stream.
Observed behavior
I got the following error response:
{"id":"api.context.permissions.app_error","message":"You do not have the appropriate permissions","detailed_error":"","request_id":"d46p13oujpgi3bh3g6n1kdru5a","status_code":403}
What I've tried and didn't work:
Using "town-square" as the channel id. This gave another error:
{"id":"api.context.404.app_error","message":"Sorry, we could not find the page.","detailed_error":"There doesn't appear to be an api call for the url='/api/v3/teams/teem1/channels/town-square/posts/create'. Typo? are you missing a team_id or user_id as part of the url?","status_code":404}
Any ideas about what I'm doing wrong?
Thanks