Seafile Web Api 2.1 - Two factor

Hi,
Can I get info that user using two factor auth before getting token over web api? And after this, how to send auth code. This is not in documentation and api getting {"non_field_errors":["Two factor auth token is missing."]}

If the two factor auth is not enabled for a certain user, you won’t encounter this error message. So I think the return info can serve as a good indicator. To send the auth code, please check my answer in this post: Ubuntu SeaDrive without GUI - obtain auth token with two-factor

Yes, I’m not saying the message is bad, it’s just for better explain my problem. OK so if I understand your message, I have to just send X-SEAFILE-OTP header with TFA code with auth credentials like show doc for get token?

Yes, it is.