mirror of
https://github.com/mastodon/documentation
synced 2025-04-11 22:56:17 +02:00

* Improve deprecation messaging for Application#vapid_key * Format JSON examples in Instance methods * Remove vapid_key from Apps API examples, since this property is deprecated on Application entity * Add documentation for new OAuth 2.0 features added in 4.3.0 * Improve documentation for oauth-scopes * Update content/en/api/oauth-scopes.md Co-authored-by: Matt Jankowski <matt@jankowski.online> * Update content/en/api/oauth-scopes.md Co-authored-by: Matt Jankowski <matt@jankowski.online> * Update content/en/api/oauth-scopes.md Co-authored-by: Matt Jankowski <matt@jankowski.online> * Update content/en/api/oauth-scopes.md Co-authored-by: Matt Jankowski <matt@jankowski.online> * Add deprecated and removed shortcode labels * Use deprecated and removed shortcodes * Improve OAuth documentation * More OAuth documentation improvements * Correct streaming API documentation after 4.2.0 changes * Add note about improved Push Subscription API validation in 4.3.0 * Fix inconsistent OAuth label formatting * Add note that there is a relationship between Accounts and the Application used to create them * Add note that application registration endpoint also supports JSON bodies * Be consistent in the formatting of placeholder values for Bearer tokens * code review changes * Slight changes in wording * Add documentation for PKCE * Removal of crypto oauth scope * Cross-link authorization's scope with the OAuth Scopes documentation * Update content/en/methods/oauth.md * Update content/en/api/oauth-scopes.md --------- Co-authored-by: Matt Jankowski <matt@jankowski.online> Co-authored-by: David Roetzel <david@roetzel.de>
79 lines
1.8 KiB
Markdown
79 lines
1.8 KiB
Markdown
---
|
|
title: emails API methods
|
|
description: Request a new confirmation email, potentially to a new email address.
|
|
menu:
|
|
docs:
|
|
weight: 20
|
|
name: emails
|
|
parent: methods-apps
|
|
identifier: methods-emails
|
|
aliases: [
|
|
"/methods/emails",
|
|
"/api/methods/emails",
|
|
"/methods/apps/emails",
|
|
]
|
|
---
|
|
|
|
<style>
|
|
#TableOfContents ul ul ul {display: none}
|
|
</style>
|
|
|
|
## Resend confirmation email {#confirmation}
|
|
|
|
```http
|
|
POST /api/v1/emails/confirmations HTTP/1.1
|
|
```
|
|
|
|
Resend a new confirmation email. If an email is provided, updates the unconfirmed user's email before resending the confirmation email.
|
|
|
|
**Returns:** Empty\
|
|
**OAuth:** User token issued to the client that created the unconfirmed user\
|
|
**Version history:**\
|
|
3.4.0 - added
|
|
|
|
#### Request
|
|
##### Headers
|
|
|
|
Authorization
|
|
: {{<required>}} Provide this header with `Bearer <user_token>` to gain authorized access to this API method.
|
|
|
|
##### Form data parameters
|
|
|
|
email
|
|
: String. If provided, updates the unconfirmed user's email before resending the confirmation email.
|
|
|
|
#### Response
|
|
##### 200: OK
|
|
|
|
```json
|
|
{}
|
|
```
|
|
|
|
##### 403: Forbidden
|
|
|
|
The client associated with the token does not own the unconfirmed user.
|
|
|
|
```json
|
|
{
|
|
"error": "This method is only available to the application the user originally signed-up with"
|
|
}
|
|
```
|
|
|
|
Alternatively, the user has already confirmed their email.
|
|
|
|
```json
|
|
{
|
|
"error": "This method is only available while the e-mail is awaiting confirmation"
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## See also
|
|
|
|
{{< page-relref ref="methods/apps#create" caption="POST /api/v1/apps" >}}
|
|
|
|
{{< page-relref ref="methods/accounts#create" caption="POST /api/v1/accounts" >}}
|
|
|
|
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/emails/confirmations_controller.rb" caption="app/controllers/api/v1/emails/confirmations_controller.rb" >}}
|