
* fix relrefs around trends and related entities * revert moving caption-links to middle of page * hide empty menu in table of contents * clarify edit notifs are only for boosted statuses * following/followers no longer need auth * fix typo * specify cooldown period for account Move * use the correct cooldown * add missing parameters to accounts/id/statuses * link to account_statuses_filter.rb * fix typo (#1072) * fix typo (#1073) * fix link to http sig spec (#1067) * simply HTTP request examples in api methods docs * add missing client_secret to oauth/token (#1062) * Add any, all, none to hashtag timeline * minor formatting changes * Update signature requirements and advice * fix public key -> private key * clarify use of RSA with SHA256 * Add note about saving your profile after adding rel-me link * v2 filters api * comment out params that shouldn't be used in v2 filter api * admin trends * remove old todo * canonical email blocks + scheduled statuses * remove under-construction warnings from finished pages * verify api method params with source code * fix typo (#1088) * fix broken caption-links (#1100) * fix formatting of entities (#1094) * Remove keybase section from user guide (#1093) * fix typos (#1092) * Verify limits are accurate (#1086) * add mention of iframe limitation (#1084) * Add CORS header to WEB_DOMAIN example (#1083) * Fix typo (#1081) * pin http sigs spec at draft 8 * Revert "pin http sigs spec at draft 8" This reverts commit 9fd5f7032b69b29e77599dd62adfe8d2f5cd4f20. * add case sensitivity warning to 4.0 roles * Add url length note to bio (#1087) * remove follow scope from examples (#1103) * clarify usage of update_credentials to update profile fields * add noindex to Account entitity * remove required hint from technically not required property
3.9 KiB
title | description | menu | aliases | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
suggestions API methods | Server-generated suggestions on who to follow, based on previous positive interactions. |
|
|
View follow suggestions (v2)
GET /api/v2/suggestions HTTP/1.1
Accounts that are promoted by staff, or that the user has had past positive interactions with, but is not yet following.
Returns: Array of [Suggestion]({{< relref "entities/Suggestion" >}})
OAuth: User token + read
Version history:
3.4.0 - added
Request
Headers
- Authorization
- {{}} Provide this header with
Bearer <user token>
to gain authorized access to this API method.
Query parameters
- limit
- Integer. Maximum number of results to return. Defaults to 40 accounts. Max 80 accounts.
Response
200: OK
[
{
"source": "past_interactions",
"account": {
"id": "784058",
"username": "katie",
"acct": "katie@pleroma.voidlurker.net",
// ...
},
// ...
{
"source": "global",
"account": {
"id": "108194863260762493",
"username": "thunderbird",
"acct": "thunderbird@mastodon.online",
// ...
}
]
401: Unauthorized
Invalid or missing Authorization header.
{
"error": "The access token is invalid"
}
Remove a suggestion
DELETE /api/v1/suggestions/:account_id HTTP/1.1
Remove an account from follow suggestions.
Returns: n/a
OAuth: User token + read
Version history:
2.4.3 - added
Request
Path parameters
- :account_id
- {{}} String. The ID of the Account in the database.
Headers
- Authorization
- {{}} Provide this header with
Bearer <user token>
to gain authorized access to this API method.
Response
200: OK
A successful call will return an empty object. Note the call will be successful even if the account id provided is invalid or is not a suggested account.
{}
401: Unauthorized
Invalid or missing Authorization header.
{
"error": "The access token is invalid"
}
(DEPRECATED) View follow suggestions (v1)
GET /api/v1/suggestions HTTP/1.1
Accounts the user has had past positive interactions with, but is not yet following.
Returns: Array of [Account]({{< relref "entities/Account" >}})
OAuth: User token + read
Version history:
2.4.3 - added
3.4.0 - deprecated
Request
Headers
- Authorization
- {{}} Provide this header with
Bearer <user token>
to gain authorized access to this API method.
Query parameters
- limit
- Integer. Maximum number of results to return. Defaults to 40 accounts. Max 80 accounts.
Response
200: OK
[
{
"id": "332766",
"username": "kaniini",
"acct": "kaniini@pleroma.site",
// ...
},
{
"id": "689455",
"username": "interneteh",
"acct": "interneteh@sunbeam.city",
// ...
},
{
"id": "764276",
"username": "Dee",
"acct": "Dee@fedi.underscore.world",
// ...
},
// ...
]
401: Unauthorized
Invalid or missing Authorization header.
{
"error": "The access token is invalid"
}
See also
{{< page-relref ref="methods/accounts#follow" caption="POST /api/v1/accounts/:id/follow" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v2/suggestions_controller.rb" caption="app/controllers/api/v2/suggestions_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/suggestions_controller.rb" caption="app/controllers/api/v1/suggestions_controller.rb" >}}