Minhaj
(Minhaj Shakeel)
1
I am sending a PUT
request to http://localhost:3000/t/220.json
with {"tags":["bug"]}
to update the tags on my topic with ID 220
.
I am getting Error 403
{"errors":["You are not permitted to view the requested resource."],"error_type":"invalid_access"}
.
Can someone tell me what I am doing wrong here?
1 Like
Some endpoints require an authentication. You will need to pass an API user and key: https://docs.discourse.org/
2 Likes
Minhaj
(Minhaj Shakeel)
3
I have taken care of authentication. Infact, I am able to add post on the same topic from API.
1 Like
I don’t know then, but the url should be /t/-/220.json
if you don’t provide a slug.
4 Likes
Minhaj
(Minhaj Shakeel)
5
Thanks, It worked. But can you elaborate what is a slug in terms?
1 Like
Your SEO-friendly topic title in this case.
This slug here is: not-able-to-update-tags-using-api
(look tat the bar address)
By the way, this tip about -
is actually from the documentation:
2 Likes
system
(system)
Closed
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.