@pyc4 said:
I was thinking it is possible to generate hash from given password that is exactly the same as the hash written to database.
Only if you use the same salt, but you don't have the salt, so therein lies the problem 😄
Hi, @phenomlab!
Calls to create:
In my project I call the /api/v3/topics/
to create a new topic via Python and requests
lib:
data = {
"cid": int(cid),
"title": entry.title,
"content": '\n'.join(description),
"tags": tags
}
headers = {'Authorization': 'Bearer {token}'.format(token=os.environ.get('NODEBB_TOKEN'))}
url = '{host}/api/v3/topics/'.format(host=os.environ.get('NODEBB_URL'))
response = requests.post(
url=url,
headers=headers,
json=data
)
response.raise_for_status()