ruwuma/ruma-client-api/src/r0/contact/request_contact_verification_token.rs
Jonas Platte 6329cd471e Add 'ruma-client-api/' from commit '632eb9d520028816c5fb7224bd0aca8d1e3793f1'
git-subtree-dir: ruma-client-api
git-subtree-mainline: e5233c49f610f866e3c9bf8529a0613171fc2fe4
git-subtree-split: 632eb9d520028816c5fb7224bd0aca8d1e3793f1
2020-06-05 17:11:09 +02:00

48 lines
1.6 KiB
Rust

//! [POST /_matrix/client/r0/account/3pid/email/requestToken](https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-account-3pid-email-requesttoken)
use js_int::UInt;
use ruma_api::ruma_api;
ruma_api! {
metadata {
description: "Ask for a verification token for a given 3rd party ID.",
method: POST,
name: "request_contact_verification_token",
path: "/_matrix/client/r0/account/3pid/email/requestToken",
rate_limited: false,
requires_authentication: false,
}
request {
/// Client-generated secret string used to protect this session.
pub client_secret: String,
/// The email address.
pub email: String,
/// A URL for the identity server to redirect the user to after
/// validation is completed.
#[serde(skip_serializing_if = "Option::is_none")]
pub next_link: Option<String>,
/// Used to distinguish protocol level retries from requests to re-send
/// the email.
pub send_attempt: UInt,
/// The identity server to send the onward request to as a hostname with
/// an appended colon and port number if the port is not the default.
#[serde(skip_serializing_if = "Option::is_none")]
pub id_server: Option<String>,
/// An access token previously registered with the identity server.
///
/// Required if an `id_server` is supplied.
#[serde(skip_serializing_if = "Option::is_none")]
pub id_access_token: Option<String>,
}
response {}
error: crate::Error
}