# API fails on secondsite, worked on primary/default site

**URL:** https://meta.discourse.org/t/api-fails-on-secondsite-worked-on-primary-default-site/276937
**Category:** Development
**Tags:** rest-api
**Created:** [August 28, 2023, 8:03pm UTC](https://meta.discourse.org/t/api-fails-on-secondsite-worked-on-primary-default-site/276937 "2023-08-28T20:03:05Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![MikeNolan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikenolan/32/297597_2.png) [@MikeNolan](https://meta.discourse.org/u/MikeNolan)
#### Post date: [August 30, 2023, 1:04am UTC](https://meta.discourse.org/t/api-fails-on-secondsite-worked-on-primary-default-site/276937/6 "2023-08-30T01:04:24Z")

</div>

As far as I can tell, there’s no option to reduce the scope of an API key so that it handles deactivations, that’s not one of the options available, but a global key doesn’t work anyway. (API’s need work, IMHO.)

I don’t know where the deactivate.json code is, a search on my server doesn’t find it, so apparently it isn’t a separate file. I’m wondering if there’s something specific about this being a secondsite that isn’t correct, because it worked great on the default site.

It would not be the first problem I’ve found with secondsites, though I"m not sure if anyone ever logged the first one as a problem, it has to do with code in an nginx config file that checks to make sure the domain name in the URL is the default one, I just comment out those lines of code whenever I do a rebuild. I reported this problem in this post:

> [@Multisite vs multiple containers](https://meta.discourse.org/t/multisite-vs-multiple-containers/175275/10):
>
> Thought I would give an update on my situation. After some study, I decided I needed a multisite setup (one container at this point) with an ‘outside’ nginx site to explain the setup and direct people and traffic to the separate discourse sites. That way I could make both sites open for read-only access (and web crawlers) without the folks on list1 having to deal with the content from list2. I may have to fiddle with robots.txt to make the web crawlers happy. The multisite setup examples wer…

---

_[View the full topic](https://meta.discourse.org/t/api-fails-on-secondsite-worked-on-primary-default-site/276937)._
