Method: users.settings.forwardingAddresses.create
Yönlendirme adresi oluşturur. Sahiplik doğrulaması gerekiyorsa alıcıya bir mesaj gönderilir ve kaynağın doğrulama durumu pending
olarak ayarlanır. Aksi takdirde kaynak, doğrulama durumu accepted
olarak ayarlanır.
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/forwardingAddresses
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, ForwardingAddress
öğesinin bir örneğini içerir.
Yanıt gövdesi
Başarılı olursa yanıt gövdesi, yeni oluşturulan ForwardingAddress
ö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 forwarding address for a Gmail user, requiring domain-wide delegated authority for service accounts."],["If ownership verification is needed, a verification message is sent, setting the status to `pending`; otherwise, the status is set to `accepted`."],["Uses the `POST` method and provides details on the request body, response body, path parameters, and required authorization scope."],["This feature utilizes the `https://www.googleapis.com/auth/gmail.settings.sharing` OAuth scope for access and management of forwarding addresses."]]],["A forwarding address is created using a `POST` request to the specified URL, including the user's email in the `userId` path parameter. The request body must contain a `ForwardingAddress` instance. Ownership verification might be initiated, setting the status to `pending`. The operation is limited to service accounts with domain-wide authority, requiring the `gmail.settings.sharing` OAuth scope. Successful creation returns a new `ForwardingAddress` instance in the response body.\n"]]