Rename Topic using API

Next time can you please include any error messages you have. What is the response code? What is the response text that you get back?

I don’t know much about python, but maybe it has something to do with newline characters in your data hash.

This code works fine:

import requests
url = 'http://192.168.56.2:3000/t/-/1.json'
data = {'api_key': '62bb871486b3bf12af6dde4610e6b2d825588eccd6b0b6ea5de0f35c129992fc','api_username': 'system','title': 'This topic was renamed with python'}
response = requests.put(url, data=data)
print response
print response.text

output:

python app.py
<Response [200]>
{"basic_topic":{"id":1,"title":"This topic was renamed with python","fancy_title":"This topic was renamed with python","slug":"this-topic-was-renamed-with-python","posts_count":1}}