# לא ניתן לערוך נושא באמצעות API למרות שיש גישת כתיבה לנושא

**URL:** <https://meta.discourse.org/t/unable-to-edit-topic-via-api-despite-topic-write-access/219805>\
**Category:** Bug\
**Tags:** rest-api\
**Created:** [2 במרץ,‏ 2022,‏ 8:32am UTC](https://meta.discourse.org/t/unable-to-edit-topic-via-api-despite-topic-write-access/219805 "2022-03-02T08:32:53Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mkows](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mkows/32/251661_2.png) [@mkows](https://meta.discourse.org/u/mkows)\
**Post date:** [2 במרץ,‏ 2022,‏ 8:32am UTC](https://meta.discourse.org/t/unable-to-edit-topic-via-api-despite-topic-write-access/219805/1 "2022-03-02T08:32:54Z")

</div>

Hey all,

I noticed that, despite having Topic Write access, I am not allowed to edit topic’s title.  
This seem to only work when API key has a global scope.

With API key that has the following permission scopes:

 ![Screenshot 2022-03-02 at 12.29.46](https://global.discourse-cdn.com/meta/original/3X/1/3/1343007ae5e9e44d3bf2a0beb21adb56301bc326.jpeg)

I am getting:

```plaintext
curl 'https:// __NAME__.discourse.team/t/-/19.json' \
  -H "Api-Key: 3990a1..." \
  -H "Api-Username: system" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d "{ \"title\": \"Title - test curl v5\" }"

{"errors":["You are not permitted to view the requested resource. The API username or key is invalid."],"error_type":"invalid_access"}

```

And I get the same response when I select all granular scopes.

Only when creating an API key with Scope: Global, I manage to edit topic’s title:

```plaintext
curl 'https:// __NAME__.discourse.team/t/-/19.json' \
  -H "Api-Key: 0adc49d..." \
  -H "Api-Username: system" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d "{ \"title\": \"Title - test curl v5\" }"

{"basic_topic":{"id":19,"title":"Title - test curl v5","fancy_title":"Title - test curl v5","slug":"title-test-curl-v5","posts_count":2}}

```

I would expect from topic write access to support edit operation. It seems to me like enforcing global scope for that is not desired.

---

_[View the full topic](https://meta.discourse.org/t/unable-to-edit-topic-via-api-despite-topic-write-access/219805)._
