Hi David, Thank you:
here is my request:
{
"url": "users.json",
"method": "post",
"data": {
"api_key": "57d06a163190ee90de1118ac2adbaf5eeb5aa93d4d02dbe8f5d424c388f126e294c",
"api_username": "Nathan001",
"name": "tokgood",
"email": "tokgood@qq.com",
"password": "64c6457d-b815-4e87-8ea1-e66becd710bc",
"username": "2cx9pyCMyn",
"active": true,
"approved": true
},
"headers": {
"common": {
"Accept": "application/json, text/plain, */*"
},
"delete": {},
"get": {},
"head": {},
"post": {
"Content-Type": "application/x-www-form-urlencoded"
},
"put": {
"Content-Type": "application/x-www-form-urlencoded"
},
"patch": {
"Content-Type": "application/x-www-form-urlencoded"
},
"content-type": "multipart/form-data"
},
"baseURL": "https://www.tuntry.com/",
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 60000,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1
}
I have double-checked the API user and key, it’s correct.
I just wrapped a post request with Axios.
const post = (url, data) => service.post(url, {
api_key: Config.discourse.api_key,
api_username: Config.discourse.api_username,
...data,
}
)