# 403 Error during multiple API calls

**URL:** https://meta.discourse.org/t/403-error-during-multiple-api-calls/148346
**Category:** Development
**Tags:** rest-api
**Created:** [April 17, 2020, 12:53pm UTC](https://meta.discourse.org/t/403-error-during-multiple-api-calls/148346 "2020-04-17T12:53:26Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [April 17, 2020, 4:17pm UTC](https://meta.discourse.org/t/403-error-during-multiple-api-calls/148346/4 "2020-04-17T16:17:43Z")

</div>

The API credentials need to be in the request header. You also need to use a dash instead of an underscore for the header field names:

- `api_key` needs to be changed to `api-key` (or `Api-Key`)
- `api_username` needs to be changed to `api-username` (or `Api-Username`)

The rule is that the header field names are _not_ case sensitive, but you need to use dashes, not underscores. (I learned this the hard way.) Have a look at the example at the top of [Discourse REST API Documentation](https://meta.discourse.org/t/discourse-api-documentation/22706) to see a properly formatted API request.

---

_[View the full topic](https://meta.discourse.org/t/403-error-during-multiple-api-calls/148346)._
