# Master branch API call create\_direct returns "blank" channel details

**URL:** <https://forum.mattermost.com/t/master-branch-api-call-create-direct-returns-blank-channel-details/3211>\
**Category:** Troubleshooting\
**Created:** [May 5, 2017, 2:34pm UTC](https://forum.mattermost.com/t/master-branch-api-call-create-direct-returns-blank-channel-details/3211 "2017-05-05T14:34:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrycheng](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@chrycheng](https://forum.mattermost.com/u/chrycheng)\
**Post date:** [May 5, 2017, 2:34pm UTC](https://forum.mattermost.com/t/master-branch-api-call-create-direct-returns-blank-channel-details/3211/1 "2017-05-05T14:34:23Z")

</div>

It does not appear to be in the [documentation](https://api.mattermost.com/master/). Looking at the [JavaScript driver code](https://github.com/mattermost/mattermost-driver-javascript/blob/master/client.jsx#L1391), I guessed that it would be something like this:

```bash
curl -i -d '{"user_id":"..."}' -H 'Authorization: Bearer ...' https://.../api/v3/teams/.../channels/create_direct

```

The response I got is:

```plaintext
HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
Content-Type: application/json
X-Cluster-Id:
X-Ratelimit-Limit: 10
X-Ratelimit-Remaining: 9
X-Ratelimit-Reset: 1
X-Request-Id: 5ge6iuzj17r45mn1htoniq4ayc
X-Version-Id: 3.3.0.b95a0e0868202e6adaa530ff8366460e
Date: Fri, 05 May 2017 14:31:25 GMT
Content-Length: 200
Via: 1.1 vegur

{"id":"","create_at":0,"update_at":0,"delete_at":0,"team_id":"","type":"","display_name":"","name":"","header":"","purpose":"","last_post_at":0,"total_msg_count":0,"extra_update_at":0,"creator_id":""}

```

Is this a bug or am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![chrycheng](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@chrycheng](https://forum.mattermost.com/u/chrycheng)\
**Post date:** [May 7, 2017, 6:17pm UTC](https://forum.mattermost.com/t/master-branch-api-call-create-direct-returns-blank-channel-details/3211/2 "2017-05-07T18:17:55Z")

</div>

I tried it again on a fresh Mattermost instance and the direct channel details were returned correctly the first time. It behaved as described above the succeeding times. I thought this might be a regression of an [issue](https://github.com/mattermost/platform/pull/4745) that’s been marked as fixed in master months ago. But then I thought to check exactly what version is being deployed by the Deploy to Heroku button in the README in the [GitHub page](https://github.com/mattermost/platform). I saw that the link was deploying from a separate repo whose last commit was a few months before the fix. I suppose this means I really am running into the issue cited above. I think something needs to be there by that link that indicates it’s not deploying the repo it’s found on.

---

<div class="post-metadata">

**Author:** ![jwilander](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/jwilander/32/8440_2.png) [@jwilander](https://forum.mattermost.com/u/jwilander)\
**Post date:** [May 17, 2017, 12:12pm UTC](https://forum.mattermost.com/t/master-branch-api-call-create-direct-returns-blank-channel-details/3211/3 "2017-05-17T12:12:06Z")

</div>

Hi @chrycheng,

I just tried this locally on latest master and it seems to be working fine for me:

```auto
curl -i -d '{"user_id": "fc3izce8338dtmw6ypsro1oo5c"}' -H 'Authorization: Bearer sessiontoken' http://localhost:8065/api/v3/teams/jfw19jcanbykbmj6bs5idhw3ca/channels/create_direct

```

The response I got was:

```auto
HTTP/1.1 200 OK
Content-Type: application/json
X-Cluster-Id: 
X-Request-Id: d57666ekdirdbq9uonn59bp97c
X-Version-Id: 3.9.0.dev.851d92ebc6f67bac3dac7c2e8487a5f2.false
Date: Wed, 17 May 2017 12:09:46 GMT
Content-Length: 317

{"id":"75sc7f8cu7f8pmj63rit99zdwy","create_at":1494880285514,"update_at":1494880285514,"delete_at":0,"team_id":"","type":"D","display_name":"","name":"dbcankcs7i8gi84s6a4iaatwee__fc3izce8338dtmw6ypsro1oo5c","header":"","purpose":"","last_post_at":0,"total_msg_count":0,"extra_update_at":1494880285514,"creator_id":""} 

```
