# \[SOLVED\] Submitting a post via REST: You do not have the appropriate permissions

**URL:** <https://forum.mattermost.com/t/solved-submitting-a-post-via-rest-you-do-not-have-the-appropriate-permissions/2274>\
**Category:** Troubleshooting\
**Created:** [September 23, 2016, 9:50am UTC](https://forum.mattermost.com/t/solved-submitting-a-post-via-rest-you-do-not-have-the-appropriate-permissions/2274 "2016-09-23T09:50:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![domrue](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@domrue](https://forum.mattermost.com/u/domrue)\
**Post date:** [September 23, 2016, 9:50am UTC](https://forum.mattermost.com/t/solved-submitting-a-post-via-rest-you-do-not-have-the-appropriate-permissions/2274/1 "2016-09-23T09:50:45Z")

</div>

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](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 🙂

---

<div class="post-metadata">

**Author:** ![lfbrock](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lfbrock/32/1901_2.png) [@lfbrock](https://forum.mattermost.com/u/lfbrock)\
**Post date:** [October 12, 2016, 3:55pm UTC](https://forum.mattermost.com/t/solved-submitting-a-post-via-rest-you-do-not-have-the-appropriate-permissions/2274/2 "2016-10-12T15:55:48Z")

</div>

Hi @domrue, did this issue get solved for you or are you still getting errors?

---

<div class="post-metadata">

**Author:** ![ChrisyB75](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@ChrisyB75](https://forum.mattermost.com/u/ChrisyB75)\
**Post date:** [October 12, 2016, 4:39pm UTC](https://forum.mattermost.com/t/solved-submitting-a-post-via-rest-you-do-not-have-the-appropriate-permissions/2274/3 "2016-10-12T16:39:52Z")

</div>

Hi @domrue,

I was having a similar issue earlier today, have you tried using the id for the team rather than it’s name?

If I POST to:

`http://localhost:8065/api/v3/teams/development/channels/8yce4jb34irc9mrkjcnj7k8p1a/posts/create`  
`{"channel_id": "8yce4jb34irc9mrkjcnj7k8p1a", "message": "Message from API!"}`

I get the same error you are reporting, however if I try:

`http://localhost:8065/api/v3/teams/t8wxrxbwwtbwfbuteahkigunry/channels/8yce4jb34irc9mrkjcnj7k8p1a/posts/create`  
`{"channel_id": "8yce4jb34irc9mrkjcnj7k8p1a", "message": "Message from API!"}`

I get the expected response, and my message is posted to the channel on my Mattermost server.

As a side note, I’ve noticed that using the id or name of the team when returning a channel list give different results.

`http://localhost:8065/api/v3/teams/t8wxrxbwwtbwfbuteahkigunry/channels/` is returning all expected channels (channels, private groups and direct messages).

While `http://localhost:8065/api/v3/teams/development/channels/` is only returning a list of channels for direct messages.

Hopefully this helps, I’ve only been looking at the API for a couple of days but happy to help where I can.

---

<div class="post-metadata">

**Author:** ![domrue](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@domrue](https://forum.mattermost.com/u/domrue)\
**Post date:** [October 12, 2016, 4:53pm UTC](https://forum.mattermost.com/t/solved-submitting-a-post-via-rest-you-do-not-have-the-appropriate-permissions/2274/4 "2016-10-12T16:53:06Z")

</div>

Hi!

Indeed using the **team id** rather than the team name solved the problem!

Thanks 😌
