Some user gets 401 error code when requests POST of REST Api

directmessages

#1

I cannot get 200 response from twitter api for POST from my iOS app.

・Swift 3.0.1
・Fabric
・TwitterKit
・Some users can get 200 response when requesting POST api, but others gets 401 error response.
・All users can get 200 response from GET api.
・All users can get 200 response using Twitter’s API console.
・I confirmed their settings of twitter about receiving message and publication of tweets is no problem. Their have permission for direct message and tweet.
・I confirmed secret and api key in my app’s info.plist is correct.

Why some users cannot use POST api from my app, others can use it.
Why some users cannot use POST api from my app, but can do it from api console?

What shoud I do to make all users send direct message.


#2

I use swift and Fabric, TwitterKit.

My secret and api key is correct. and I got 200 from https://api.twitter.com/1/account/verify_credentials.json.