# Getting error message 403 on post request

**URL:** https://meta.discourse.org/t/getting-error-message-403-on-post-request/100169
**Category:** Development
**Created:** [October 22, 2018, 2:11pm UTC](https://meta.discourse.org/t/getting-error-message-403-on-post-request/100169 "2018-10-22T14:11:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Edwin\_Mhoy\_Silva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/edwin_mhoy_silva/32/109980_2.png) [@Edwin\_Mhoy\_Silva](https://meta.discourse.org/u/Edwin_Mhoy_Silva)
#### Post date: [October 22, 2018, 2:11pm UTC](https://meta.discourse.org/t/getting-error-message-403-on-post-request/100169/1 "2018-10-22T14:11:58Z")

</div>

Hey.  
I´m building a custom CMS to our discourse platform.  
I’m having some trouble when trying to post something.  
I’m building it in angular and the programing language is typescript.  
Here is a picture of my function

```plaintext
 createACompetition(CompetitionName: string, groupName) {
    const headers = new HttpHeaders().set('Content-Type', 'multipart/form-data');
    const data = new FormData();
    data.append('api_key', WLIApiKey);
    data.append('api_username', WLIUsername);
    data.append('color', '49d9e9');
    data.append('text_color', 'f0fcfd');
    data.append('name', CompetitionName);
    console.log(data.get('name'));
    // Security group on create
    // data.append('permissions[]' + groupName, '1');

    return this.http.post(url + '/categories', data, {
      headers
    });
  }

```

and this is my error message

 ![47](https://global.discourse-cdn.com/meta/original/3X/4/4/447abde3f84f71424b1ac1ce69fe2ab49a7ad36b.png)

Did I make a mistake in my post request ?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 22, 2018, 2:53pm UTC](https://meta.discourse.org/t/getting-error-message-403-on-post-request/100169/2 "2018-10-22T14:53:03Z")

</div>

My guess is that the API key is wrong or the user didn’t have permission.

---

<div class="post-metadata">

### Author: ![Edwin\_Silva](https://avatars.discourse-cdn.com/v4/letter/e/4bbf92/32.png) [@Edwin\_Silva](https://meta.discourse.org/u/Edwin_Silva)
#### Post date: [October 22, 2018, 3:07pm UTC](https://meta.discourse.org/t/getting-error-message-403-on-post-request/100169/3 "2018-10-22T15:07:17Z")

</div>

No, that not the problem.  
I Think it has something to do with headers?
