# New to API, 403 Errors

**URL:** <https://meta.discourse.org/t/new-to-api-403-errors/67841>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [August 10, 2017, 10:06pm UTC](https://meta.discourse.org/t/new-to-api-403-errors/67841 "2017-08-10T22:06:11Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![donlucas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/donlucas/32/120794_2.png) [@donlucas](https://meta.discourse.org/u/donlucas)\
**Post date:** [August 11, 2017, 4:17am UTC](https://meta.discourse.org/t/new-to-api-403-errors/67841/9 "2017-08-11T04:17:06Z")

</div>

I’ve created a few admin users and verified them against the api using a get request for site settings:

> `curl -X GET "https://my.discourse.com/admin/site_settings.json" -F "api_key=theGeneratedAPIKeyForanAdmin" -F "api_username=anAdmin"`

This returns the site settings, However attempting to add a user to a group or even add a topic fail with the same api users.

For instance:

> `curl -X POST "https://my.discourse.com/posts" -H "Content-Type: multipart/form-data;" -F "api_key=theGeneratedAPIKeyForanAdmin" -F "api_username=anAdmin" -F "title=This is an API created topic" -F "topic_id=38" -F "raw=This is the end of the world as we know it, and I feel fine."`

returns:

`{"action":"create_post","errors":["Something has gone wrong. Perhaps this topic was closed or deleted while you were looking at it?"]}`

I’ve left category, target\_usernames, archetype, create\_at out of the curl command as they’re optional (according to the api docs).

---

_[View the full topic](https://meta.discourse.org/t/new-to-api-403-errors/67841)._
