Method: users.settings.sendAs.create
Özel bir "gönderen" farklı gönderen takma adı oluşturur. Bir SMTP AHS belirtilirse Gmail, takma adı oluşturmadan önce yapılandırmayı doğrulamak için SMTP hizmetine bağlanmayı dener. Takma ad için sahiplik doğrulaması gerekiyorsa e-posta adresine bir ileti gönderilir ve kaynağın doğrulama durumu pending
olarak ayarlanır. Aksi takdirde kaynak, doğrulama durumu accepted
olarak ayarlanarak oluşturulur. İmza sağlanmışsa Gmail, takma adla kaydetmeden önce HTML'yi temizler.
Bu yöntem yalnızca alan genelinde yetki verilmiş hizmet hesabı istemcileri tarafından kullanılabilir.
HTTP isteği
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/sendAs
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
userId |
string
Kullanıcının e-posta adresi. Kimliği doğrulanmış kullanıcıyı belirtmek için "me" özel değeri kullanılabilir.
|
İstek içeriği
İstek metni, SendAs
öğesinin bir örneğini içerir.
Yanıt gövdesi
Başarılı olursa yanıt gövdesi, yeni oluşturulan SendAs
örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamını gerektirir:
https://www.googleapis.com/auth/gmail.settings.sharing
Daha fazla bilgi için Yetkilendirme kılavuzuna göz atın.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-09-05 UTC.
[null,null,["Son güncelleme tarihi: 2024-09-05 UTC."],[[["Creates a custom \"from\" send-as alias, requiring validation for SMTP MSAs and potentially ownership verification."],["Accessible only to service account clients with delegated domain-wide authority, using a specific HTTP POST request."],["Utilizes path parameters including `userId` to identify the user's email address, and requires a request body with a `SendAs` instance."],["Returns a `SendAs` instance in the response body upon successful alias creation."],["Needs authorization with the `https://www.googleapis.com/auth/gmail.settings.sharing` scope."]]],["This describes how to create a custom \"from\" send-as alias in Gmail using a `POST` request to the specified URL. The request includes a `userId` path parameter. The request body contains `SendAs` information, and the response will also be a `SendAs` instance. The creation process may involve SMTP validation and alias verification, setting the resource's verification status accordingly. It also sanitizes provided HTML signatures. This method is limited to service account clients with delegated domain-wide authority and requires a specific OAuth scope.\n"]]