# Coisa estranha aconteceu ao criar usuário via API

**URL:** <https://meta.discourse.org/t/wired-thing-happend-when-create-user-via-api/134951>\
**Category:** Product Support\
**Created:** [3 Dezembro , 2019 08:15 UTC](https://meta.discourse.org/t/wired-thing-happend-when-create-user-via-api/134951 "2019-12-03T08:15:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![NathanLei](https://avatars.discourse-cdn.com/v4/letter/n/6bbea6/32.png) [@NathanLei](https://meta.discourse.org/u/NathanLei)\
**Post date:** [3 Dezembro , 2019 10:31 UTC](https://meta.discourse.org/t/wired-thing-happend-when-create-user-via-api/134951/3 "2019-12-03T10:31:22Z")

</div>

Olá David, Obrigado:

aqui está minha solicitação:

```
{
 "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
}

```

Verifiquei novamente o usuário e a chave da API, estão corretos.

Acabei de envolver uma solicitação POST com o Axios.

```
   const post = (url, data) => service.post(url, {
   api_key: Config.discourse.api_key,
   api_username: Config.discourse.api_username,
  ...data,
 }
)

```

---

_[View the full topic](https://meta.discourse.org/t/wired-thing-happend-when-create-user-via-api/134951)._
