login

@FormUrlEncoded
@POST(value = "users/login")
abstract suspend fun login(@Field(value = "user[login]") username: String, @Field(value = "user[password]") password: String, @Field(value = "authenticity_token") csrf: Csrf, @FieldMap(encoded = false) defaultFormParameters: LoginFieldMap = LoginFieldMap()): AO3Response<Login>

Logs in to AO3 with the specified username and password.

All further network calls to AO3 made using the backing OkHttpClient (e.g. this AO3Service instance) will be treated as if the user is logged in, until logout is called.

Parameters

username

Username of the account

password

Password of the account

csrf

Most recent CSRF token. Use getCsrfToken to retrieve the latest CSRF token immediately before calling this method.

defaultFormParameters

Non-accessible field used to pass in additional parameters required by AO3.