redirect URI
with `/?error_message=resource+owner+denied+your+app+access&error=access_denied` appended.
30 |
31 | Now make a POST call with what you now have in the URL-encoded body (with a `Content-Type` of `application/x-www-form-urlencoded`):
32 |
33 | ```bash
34 | curl "https://api.pnut.io/v1/oauth/access_token" \
35 | -d "client_id=${CLIENT_ID}" \
36 | -d "client_secret=${CLIENT_SECRET}" \
37 | -d "code=${CODE}" \
38 | -d "redirect_uri=${REDIRECT_URI}" \
39 | -d "grant_type=authorization_code" \
40 | -X POST
41 | ```
42 |
43 | A JSON response will be returned in the form of:
44 |
45 | ```json
46 | {"access_token":ACCESS_TOKEN, "token":{"...Token object..."}, "user_id":USER_ID, "username":USERNAME}
47 | ```
48 |
49 |
50 |
51 |
52 | ## Client-side flow
53 |
54 | Start with this GET:
55 |
56 | ```bash
57 | https://pnut.io/oauth/authenticate
58 | ?client_id=[client ID]
59 | &redirect_uri=[redirect URI]
60 | &scope=[comma-delimited scopes]
61 | &response_type=token
62 | ```
63 |
64 | *To always prompt the user for authorization of scopes, even if they already have, use the `https://pnut.io/oauth/authorize` endpoint instead.*
65 |
66 | This will direct the user to an authorization page just like the server-side flow. If they approve the scopes for your client, they will be redirected to your `redirect URI` with `/#access_token=[token]` appended.
67 |
68 | If the user decides *not* to authorize your client, they will be redirected to your `redirect URI` with `/#error_message=resource+owner+denied+your+app+access&error=access_denied` appended.
--------------------------------------------------------------------------------
/changes/0.3.0.md:
--------------------------------------------------------------------------------
1 | ## [v0.3.0](https://pnut.io/docs/changes/0.3.0) {#0.3.0}
2 |
3 | This is a major update to pnut.io. The following is notable.
4 |
5 | ### Features
6 |
7 | * More capable app directory
8 | * Mutes and blocks management from pnut.io
9 | * Channels
10 | * Stream markers
11 | * Client secret reset option
12 |
13 |
14 | ### Changes
15 |
16 | * `pagination_id` added to user, post, message, and channel objects in paginated responses
17 | * Following, followers, muted, and blocked user lists are now paginated
18 | * PUT/DELETE bookmark returns the post bookmarked
19 | * `presence` endpoints now include a timestamp of the last time a user was seen (even when their status is not "offline")
20 | * Bookmarks are no longer restricted to the bookmarker
21 | * `invited_by` no longer included on user objects (simply able to look it up on the invite tree on pnut.io)
22 | * Developers required to enter password on every login
23 | * Markdown links and normal links are parsed by default. To prevent parsing, must include `entities.parse_links=0`
24 | * Requests for tokens respond with errors closer to OAuth 2.0 guidelines
25 | * Removed `/posts/streams/feed`, `/posts/streams/link`, `/posts/streams/domain`, `/posts/streams/link` (more appropriate to retrieve via future search)
26 | * Moved `/system/configuration` and `/system/statistics` to `/sys/config` and `/sys/stats`
27 |
28 |
29 | ### Fixes
30 |
31 | * Inviting a user now creates a "follow" action when they auto-follow the inviter
32 | * Blocks are missing fewer edge cases
33 | * Revising a post parsing markdown links and normal links improperly
34 | * Users' list of actions executed against them could only filter by one type; now any number
35 |
36 | *Released 2016-11-24*
--------------------------------------------------------------------------------
/changes/0.4.0.md:
--------------------------------------------------------------------------------
1 | ## [v0.4.0](https://pnut.io/docs/changes/0.4.0) {#0.4.0}
2 |
3 | This is a major update to pnut.io. The following is notable.
4 |
5 | ### Features
6 |
7 | * `raw` data on posts, messages, users, and channels
8 | * Stream markers can be updated to the latest ID on post or message creation
9 | * Channel-specific sticky messages
10 | * Channel thread endpoint
11 |
12 |
13 | ### Changes
14 |
15 | * Revising posts saves the complete original post, where it used to only preserve the original `text` and `html`
16 | * `X-API-Version` header changed to a major.minor.bugfix format, though in 0.x.x, all are minor or bugfix changes
17 |
18 |
19 | ### Fixes
20 |
21 | * Avatars/covers not showing on pnut.io profiles
22 | * `/users/me/channels/subscribed` was ordered by ID only, now by most recent message or most recent creation, with clarifying `pagination_id`
23 | * Requesting a token did not return the list of scopes for it
24 | * New user creation did not properly handle the created "follow" action
25 | * Calls for user avatars/covers were not forwarding query parameters
26 |
27 | *Released 2017-01-07*
--------------------------------------------------------------------------------
/changes/0.4.1.md:
--------------------------------------------------------------------------------
1 | ## [v0.4.1](https://pnut.io/docs/changes/0.4.1) {#0.4.1}
2 |
3 | This is a minor update to pnut.io.
4 |
5 | ### Fixes
6 |
7 | * Usernames were case-sensitive in password_flow
8 | * `io.pnut.core.chat`-type channels were not creatable
9 | * Public channels included `you` in the ACL unnecessarily when not authenticated
10 | * Deleting channel messages sometimes did not work
11 | * `/users/me/actions` not returning follow actions under some circumstances
12 |
13 | *Released 2017-01-15*
--------------------------------------------------------------------------------
/changes/0.4.2.md:
--------------------------------------------------------------------------------
1 | ## [v0.4.2](https://pnut.io/docs/changes/0.4.2) {#0.4.2}
2 |
3 | This is a minor update to pnut.io.
4 |
5 | ### Features
6 |
7 | Submitting `entities.links` on posts, messages, and users works (it is incongruously entities.links on posts and messages, but content.entities.links on users)
8 | Markers are always included on `GET /channels/{channel_id}/messages` and can be included on `GET /channels/{channel_id}` with `include_marker=1` in the query
9 |
10 |
11 | ### Changes
12 |
13 | Deactivating accounts is more straight-forward and consistent
14 |
15 |
16 | ### Fixes
17 |
18 | Unicode `pos` and `len` on entities was not handled properly
19 | Tags inside markdown were parsed, breaking html/text
20 | `GET /users?ids=` can now be @-usernames and user IDs
21 | `is_nsfw` was not consistently handled (and sometimes ignored)
22 |
23 | *Released 2017-01-23*
--------------------------------------------------------------------------------
/changes/0.4.3.md:
--------------------------------------------------------------------------------
1 | ## [v0.4.3](https://pnut.io/docs/changes/0.4.3) {#0.4.3}
2 |
3 | This is a minor update to pnut.io.
4 |
5 | ### Features
6 |
7 | * `include_marker=1` option available on all stream marker-capable endpoints
8 |
9 | ### Changes
10 |
11 | * "-" was not handled correctly in link entities
12 | * Mutes were making messages and post actions appear multiple times
13 |
14 | *Released 2017-01-25*
--------------------------------------------------------------------------------
/changes/0.4.4.md:
--------------------------------------------------------------------------------
1 | ## [v0.4.4](https://pnut.io/docs/changes/0.4.4) {#0.4.4}
2 |
3 | This is a minor update to pnut.io.
4 |
5 | ### Features
6 |
7 | * All non-developers now have the ability to create one client that only they can authorize
8 | * Users who reposted or bookmarked posts can be included by including query parameters `include_reposted_by` and `include_bookmarked_by`
9 | * Basic view of tags at `https://pnut.io/tags/tag` and RSS for them at `https://pnut.io/feed/rss/posts/tags/tag`
10 |
11 |
12 | ### Changes
13 |
14 | * Non-markdown non-client-supplied links are restricted to known TLDs
15 | * Mentions are allowed at the end of word breaks (think: `"@`, `'@`, `(@`)
16 | * Improved pnut.io user profiles and threads
17 |
18 |
19 | ### Fixes
20 |
21 | * Suspended and deleted accounts no longer retrievable from pnut.io
22 | * `public_messages` and `messages` being authorized could result in only `public_messages` access
23 | * User RSS handles reposts properly
24 |
25 | *Released 2017-02-04*
--------------------------------------------------------------------------------
/changes/0.4.5.md:
--------------------------------------------------------------------------------
1 | ## [v0.4.5](https://pnut.io/docs/changes/0.4.5) {#0.4.5}
2 |
3 | This is a minor feature update to pnut.io.
4 |
5 | ### Features
6 |
7 | * Invites are now created automatically
8 | * Each app in the directory now has its own simple page, with expanded description
9 | * Can hide posts directed at people you do not follow
10 | * Can hide "copy mentions" on the mentions endpoint
11 | * New Explore streams for posts that are Conversations, Trending, and Photos
12 | * New endpoint `/users/me/channels/existing_pm` retrieves a channel between a given set of users, if it exists
13 | * The subscribed channels endpoint (`/users/me/channels/subscribed`) includes count for unread PMs in the meta field
14 | * Can now add "notes" to unused invites, to easily track what you're doing with them
15 |
16 |
17 | ### Changes
18 |
19 | * PM notifications are strictly indicators that you have unread PMs, and no longer contain the text of the messages
20 | * Better HTML version of the mention notification E-mail
21 | * Underscores now allowed in tags
22 | * Small improvement to threads and user profiles on pnut.io
23 | * Clients now require approval before being published to the app directory
24 |
25 |
26 | ### Fixes
27 |
28 | * Deauthorizing a client that doesn't have any tokens now deauthorizes its scopes properly
29 | * Deleted posts should no longer show up in older threads/streams (as well as other bleeding possibilities)
30 | * Channels were showing up multiple times (a subscription bug) on the subscribed channels endpoint
31 | * `count=-**n**` now works as expected on post streams
32 | * Text with E-mail addresses in it should not be parsed as links or mentions
33 |
34 | *Released 2017-03-03*
--------------------------------------------------------------------------------
/changes/0.4.5b.md:
--------------------------------------------------------------------------------
1 | ## [v0.4.5b](https://pnut.io/docs/changes/0.4.5b) {#0.4.5b}
2 |
3 | This is a minor feature update to pnut.io.
4 |
5 | ### Features
6 |
7 | * "Support Us" page has basic stats
8 | * New "Activity" account page, which shows the last 10 significant actions made in your account (logins, password changes, etc.)
9 |
10 | *Released 2017-03-14*
--------------------------------------------------------------------------------
/changes/0.5.0.md:
--------------------------------------------------------------------------------
1 | ## [v0.5.0](https://pnut.io/docs/changes/0.5.0) {#0.5.0}
2 |
3 | This is a feature update to pnut.io.
4 |
5 | ### Features
6 |
7 | * App tokens
8 | * App Streams
9 | * Umlauts, emoji, foreign characters allowed in tags
10 | * Logo
11 | * Many new documents, some vague
12 |
13 | ### Changes
14 |
15 | * Redirect URIs can now have query parameters and still validate
16 | * Link entities will not include redundant phishing protection
17 | * API documentation is rearranged, and included verbatim from the GitHub repository
18 | * OAuth now warns when the client is requesting a non-HTTPS redirect_uri
, and better displays what is being authorized
19 | * pnut.io now shows oembed images on posts. Other minor improvements
20 | * The "Support Us" page now includes message counts in the stats
21 | * Mentions in a post are now more likely to be considered "leading mentions"
22 | * Messages do not include counts.replies
at all (for now)
23 |
24 | ### Fixes
25 |
26 | * Multiple manually submitted links would fail to be parsed
27 | * Invites were not calculated correctly (so were seldom given out)
28 | * Redirecting after login and related edge cases are improved around OAuth
29 |
30 | *Released 2017-04-15*
--------------------------------------------------------------------------------
/changes/0.5.1.md:
--------------------------------------------------------------------------------
1 | ## [v0.5.1](https://pnut.io/docs/changes/0.5.1) {#0.5.1}
2 |
3 | This is a minor feature and bug fix update to pnut.io.
4 |
5 | ### Features
6 |
7 | * The first developer to authorize an extended scope can now customize a description of what it is used for, when users authorize the scope in the future ("Content Types" in dev area)
8 | * Users can change username once, and can change capitalization as often as they want, from pnut.io profile settings
9 | * Including `#nsfw` in a post automatically marks it as "Not Safe for Work", unless explicitly marked otherwise
10 | * Including `?exclude_channel_types=` on channel streams excludes the given types from the stream (opposite of `?channel_types=`)
11 | * Including `?include_limited_users=1` on subscribed channel streams and individual channel calls will include users as limited objects in the ACL instead of user IDs only
12 | * "Missed Conversations" explore stream added (random posts that had no interactions)
13 |
14 | ### Changes
15 |
16 | * Activity log now includes administrative events (when an admin makes you a developer, suspends your account, etc.)
17 | * Bare links are now parsed differently, and will accept more valid links, including IPv4/6 addresses
18 |
19 | ### Fixes
20 |
21 | * Emoji tag streams did not function on pnut.io
22 | * `/users/{user_id}/posts` now returns the user's posts even if an authorized user requests it after blocking or muting them
23 |
24 | *Released 2017-04-30*
--------------------------------------------------------------------------------
/changes/0.6.0.md:
--------------------------------------------------------------------------------
1 | ## [v0.6.0](https://pnut.io/docs/changes/0.6.0) {#0.6.0}
2 |
3 | This is a major feature update to pnut.io.
4 |
5 | ### Features
6 |
7 | * File API
8 | * Pay-what-you-want tier!
9 | * Repost and follow E-mail notifications
10 | * RSS feed of personal and unified streams
11 | * File Storage
12 | * MFA logins (TOTP option)
13 | * Added [microformats2](http://microformats.org/wiki/microformats2) to pnut.io posts and profiles
14 | * Added `markdown_text` to user profile when retrieving own profile (helpful for editing)
15 | * Including `&simple_login=1` on web authentication flows now shows an embed-friendly page for oauth
16 |
17 |
18 | ### Changes
19 |
20 | * Consolidated some account management areas
21 | * Increased invite limit from 5 to 7
22 | * Clarified activation process on new sign up
23 | * Notification E-mails are now digests
24 | * Avatars and cover images limited to 2097152 and 4194304 bytes, instead of 2000000 and 4000000 bytes
25 | * Posts from bots will not add threads to the "Conversations" explore stream
26 | * pnut.io now reverses markdown when editing your profile
27 |
28 |
29 | ### Fixes
30 |
31 | * Password recovery E-mail address was case-sensitive
32 | * "Users" count on user objects (number of users invited) was incorrect
33 | * Deleted messages were not being sent to App Streams
34 | * Channel owner access was denied in an edge case
35 |
36 | Note that after a year, current developers will have to pay $10/year for developer access.
37 |
38 | *Released 2017-07-25*
--------------------------------------------------------------------------------
/changes/0.7.0.md:
--------------------------------------------------------------------------------
1 | ## [v0.7.0](https://pnut.io/docs/changes/0.7.0) {#0.7.0}
2 |
3 | This is a major feature update to pnut.io.
4 |
5 | ### Features
6 |
7 | * User, post, channel, and message search
8 | * Derivative files
9 | * Auto-generated thumbnails for images
10 |
11 |
12 | ### Changes
13 |
14 | * File link expiration extended
15 | * `?include_directed_posts=0` does not exclude your own posts
16 | * Replies to your own posts do not add that thread to the Conversations explore stream
17 | * App streams allow the access token to be included in the header or query parameter, like other API calls
18 | * A message in a PM channel will re-subscribe any users who haven't muted the channel
19 | * Improved domain verification on profiles using `rel="me"` link
20 | * TOTP login authentication is available to everyone
21 |
22 |
23 | ### Fixes
24 |
25 | * `/users/{user_id}/clients` not retrieving all active clients in some cases
26 | * TOTP authentication setup
27 | * PM not able to find existing channel in some cases
28 | * Owners and full-ACL users not able to delete others' messages in non-PM channels
29 | * Complex tags in posts not rendered as links on pnut.io
30 | * `redirect_uri` did not work with an edge case
31 |
32 | *Released 2017-08-27*
--------------------------------------------------------------------------------
/changes/0.7.1.md:
--------------------------------------------------------------------------------
1 | ## [v0.7.1](https://pnut.io/docs/changes/0.7.1) {#0.7.1}
2 |
3 | This is a minor feature update to pnut.io.
4 |
5 | ### Features
6 |
7 | * Personal data exports may be requested in the "Data" section of your account (*Currently does not include files)
8 | * Numerous new characteristics for developers to note about their apps, including pictures
9 | * API errors will often include referenceable `meta.error_id` on 500 responses
10 |
11 |
12 | ### Changes
13 |
14 | * `/users/me/actions` now combines multiple objects in the `objects` list for the same action commited by different users
15 | * Front page and app pages redesigned
16 | * Link parsing should be operational; API will retrieve title and description for a link
17 | * Removed *all* GUID properties (posts, users, messages)
18 |
19 |
20 | ### Fixes
21 |
22 | * RSS tag feeds of multibyte character tags would not load
23 |
24 | *Released 2017-09-10*
--------------------------------------------------------------------------------
/changes/0.7.2.md:
--------------------------------------------------------------------------------
1 | ## [v0.7.2](https://pnut.io/docs/changes/0.7.2) {#0.7.2}
2 |
3 | This is a minor feature update to pnut.io.
4 |
5 | ### Features
6 |
7 | * App Directory reorganized into categories, multiple platforms
8 | * Apps can now be "recommended" by users
9 | * Post and message stream `meta` now includes `deleted_ids` and `revised_ids`, which are lists of post or message IDs that have been deleted or revised since `since_id`
10 | * pnut badges added to profiles; supporting users may opt in to include `badge: {object}` on their user object
11 |
12 |
13 | ### Changes
14 |
15 | * pnut.io front page redesign
16 |
17 |
18 | ### Fixes
19 |
20 | * `guid` was still included on some posts and users
21 | * Creating App Streams did not handle some errors clearly
22 |
23 | *Released 2017-09-30*
--------------------------------------------------------------------------------
/changes/0.7.3.md:
--------------------------------------------------------------------------------
1 | ## [v0.7.3](https://pnut.io/docs/changes/0.7.3) {#0.7.3}
2 |
3 | This is a minor update to pnut.io.
4 |
5 |
6 | ### Changes
7 |
8 | * Users can now sign up for an account with a pnut badge if they don't have an invite
9 | * E-mail notifications happen instantaneously, then follow up with a digest of more of the same soon after
10 | * Password flow will return error for invalid scopes
11 | * Can remove verified domain from profile
12 | * Invites page improved
13 | * Languages and timezones limited to finite list instead of dynamically generated list
14 | * Enabling MFA requires a TOTP code up front, before enabling
15 |
16 |
17 | ### Fixes
18 |
19 | * Password flow didn't allow extended scopes
20 | * `GET /users/me/channels` did not work with only extended scopes authorized
21 | * No longer authorizes an extended scope if its basic scope has already been authorized
22 |
23 | *Released 2017-10-14*
--------------------------------------------------------------------------------
/changes/0.7.4.md:
--------------------------------------------------------------------------------
1 | ## [v0.7.4](https://pnut.io/docs/changes/0.7.4) {#0.7.4}
2 |
3 | ### Features
4 |
5 | * App directory "early access" and "bot" categories
6 | * Tokens can be assigned a "token group" on creation, and tokens can be revoked for an app based on IP address and token group
7 | * `kind: audio` file type recognizes MP3, FLAC, and WAVE files
8 | * `email` scope has been added, which adds `email` to user tokens
9 | * `files:core_image` and `files:core_audio` special scopes have been added, giving access to their respective `kind` of files
10 | * oEmbed endpoint for posts and files
11 | * Endpoints for reporting posts and messages
12 | * `newcomers` post explore stream, including users' first 50 posts
13 | * Post, channel, and message searches allow `?raw_types` parameter
14 | * `io.pnut.core.channel.avatar` and `io.pnut.core.channel.cover` raw types
15 |
16 | ### Changes
17 |
18 | * RSS moved from https://pnut.io/feed/rss/ to https://api.pnut.io/v0/feed/rss/ (old links redirect)
19 | * Canonical posts and user profiles direct to @xyz's [beta app](https://beta.pnut.io)
20 | * Notifications are silenced within 30 seconds of previous notifications of the same type, and channel notifications are silenced if the user has a stream marker ahead of the message
21 | * Developers can "remember" pnut.io login
22 |
23 | ### Fixes
24 |
25 | * `raw` properly catches any improper values for `value`
26 | * Some cases where objects wouldn't be sent to app streams
27 | * User editing reverse markdown was broken with multiple markdown links
28 | * New developers' existing apps were not automatically made usable by other users
29 | * Bot and feed users' mentions did not correctly go to mention streams
30 | * `?include_message_html=0` was ignored
31 |
32 | *Released 2017-11-16*
--------------------------------------------------------------------------------
/changes/0.7.5.md:
--------------------------------------------------------------------------------
1 | ## [v0.7.5](https://pnut.io/docs/changes/0.7.5) {#0.7.5}
2 |
3 | ### Features
4 |
5 | * Pnut.io account area translations
6 | * New Privacy page includes mutes, blocks, and new function to limit who can create new private message channels with you
7 | * Bookmark E-mail notifications option for pnut badge supporters
8 | * App Streams support `raw` by setting appropriate query parameters on the websocket link
9 |
10 | ### Changes
11 |
12 | * Developer client "tokens" are no longer a thing; instead, new clients can be made by developers after a certain period
13 | * `kind` is no longer required on file upload; you may juggle whether to specify `kind`, `mime_type`, neither, both
14 | * `locale` limited to smaller list; more locales should be added on demand and as supportable
15 | * `email` scope is not authorizable over Password Flow, to prevent possible privacy concern
16 | * Link entity parsing adjusted (now includes links preceded by parenthesis)
17 | * Message streams now allow negative `count` (`?count=-4`)
18 | * App Streams now can differentiate between revised, reposted, and newly created or deleted posts
19 |
20 | ### Fixes
21 |
22 | * Numerous possible edge cases with app streams returning partial objects
23 |
24 | *Released 2017-11-30*
--------------------------------------------------------------------------------
/changes/0.7.6.md:
--------------------------------------------------------------------------------
1 | ## [v0.7.6](https://pnut.io/docs/changes/0.7.6) {#0.7.6}
2 |
3 | This is a bug fix update to pnut.io.
4 |
5 | ### Features
6 |
7 | * Option to require OTP passwords for password flow authentications
8 |
9 | ### Changes
10 |
11 | * One-Time Passwords now create a short random string for a name, instead of user input
12 | * More clarity on profile update form
13 | * MFA login now allows "Remember login" cookie but requires the TOTP code. A failed attempt or leaving the page will unset the "Remember login" cookie.
14 | * Web Flows and Password Flow return much more specific feedback when something is not set properly
15 |
16 | ### Fixes
17 |
18 | * Password form validation required a digit and uppercase, which is not supposed to be required anymore
19 | * Failed MFA login would redirect to the normal login without client authorization details, if they had been set
20 |
21 | *Released 2017-12-10*
--------------------------------------------------------------------------------
/changes/0.7.7.md:
--------------------------------------------------------------------------------
1 | ### Features
2 |
3 | * API Documentation app can be authorized, allowing you to make API calls from documentation and see the response live. The examples are editable on-page
4 |
5 | ### Changes
6 |
7 | * Link parsing improvements
8 | * Adjusted notification email timing
9 | * Post and message URI Templates must use `{object_id}` instead of `{post_id}` in links
10 | * Documentation includes type of access token required for endpoints (app vs user)
11 |
12 | ### Fixes
13 |
14 | * Failed login went to MFA login
15 | * `content.html` now begins with `` instead of `` to follow [microdata spec](http://schema.org/docs/gs.html#microdata_itemscope_itemtype)
16 |
17 | *Released 2018-01-14*
--------------------------------------------------------------------------------
/changes/0.8.0.md:
--------------------------------------------------------------------------------
1 | ## [v0.8.0](https://pnut.io/docs/changes/0.8.0) {#0.8.0}
2 |
3 | ### Features
4 |
5 | * Polls
6 | * New users are highlighted on the Invites page
7 |
8 | ### Changes
9 |
10 | * Emails on account lock out and new recent IP login
11 | * Password Flow authorization emails now express what new scopes are authorized
12 | * Basic stats are public
13 | * `avatar_image` included in channels when `?include_limited_users=1` query parameter is set
14 | * Links with emoji in the domain are recognized as links
15 | * @xyz's app *Beta* now uses the subdomain https://beta.pnut.io and is encouraged as users' first app
16 |
17 | ### Fixes
18 |
19 | * Text file encoding was ignored on upload
20 | * File names used the file token for its name when downloaded, instead of original file names
21 | * Some instabilities with database handling/what happened if there was a bug
22 | * Users could make their own posts trend
23 |
24 | *Released 2018-03-24*
--------------------------------------------------------------------------------
/changes/0.9.0.md:
--------------------------------------------------------------------------------
1 | ## [v0.9.0](https://pnut.io/docs/changes/0.9.0) {#0.9.0}
2 |
3 | ### Features
4 |
5 | * User Streams (user-specific websockets, like App Streams for individual users)
6 | * Invited users now have 512MiB of free storage, ensuring everyone has some free storage
7 | * Users may gift Pnut Badges to other users
8 | * Basic poll search
9 | * Get multiple polls by ID in a single call
10 | * Bookmarks may be saved with `note`, which is only visible to the user who bookmarked it, when retrieving their own bookmarks
11 | * Clients can limit what scopes can be authorized
12 | * `/sys/stats` now includes `counts.clients.public`, tracking clients that are "active/public" and usable by more than just a single user
13 | * Alternative API domain https://pnut-api-1.org
14 | * App Streams messages and posts now include `meta.suppress_notifications`, and `meta.subscribed_user_ids` to simplify notifications
15 | * `include_replies` and `include_mention_posts` query parameters for post streams
16 | * `has_mentions` post search filter
17 |
18 | ### Changes
19 |
20 | * Requesting account deletion requires password verification
21 | * Only human account-types can respond to polls
22 | * `is_your_response` on poll options changed to `true` or `false` from `1` or `0`
23 | * App Streams now have connection- and subscription-level query parameters
24 | * App Streams objects are more consistent
25 | * User tokens return with `storage.total` in addition to `storage.available`.
26 |
27 | ### Fixes
28 |
29 | * Some old avatars were not deleted
30 | * `/users/{id}/cover` was not redirecting properly
31 | * "Account locked out" was logged after single failed login attempt
32 | * `include_user=0` returned empty string instead of user's ID for embedded users on file objects
33 | * Following a user in rapid succession could cause multiple listings of a user in your follows or followings
34 |
35 | *Released 2018-08-13*
--------------------------------------------------------------------------------
/changes/0.9.1.md:
--------------------------------------------------------------------------------
1 | ### Features
2 |
3 | * Badge directory, earning, assigning, and setting by clients
4 | * Added `mime_types` filter to files
5 | * Added `+io.pnut.core.user` raw replacement value
6 | * Post search and channel message endpoints are accessible from RSS
7 | * New `poll_response` interaction when someone responds to your poll
8 | * New `/users/me/polls/responses` endpoint
9 |
10 | ### Changes
11 |
12 | * Improved documentation
13 | * Alternative `/users/me/interactions` and `/posts/{post_id}/interactions` endpoints
14 | * Tweaked post search
15 | * Small performance improvements to all POST calls
16 |
17 | ### Fixes
18 |
19 | * Audio file attached via oEmbed had faulty `url_expires_at`
20 | * Server-side flow didn't preserve `state` parameter
21 | * Could not delete polls
22 | * Deleted messages didn't send over user and app streams
23 |
24 | *Released 2018-09-13*
--------------------------------------------------------------------------------
/changes/0.9.2.md:
--------------------------------------------------------------------------------
1 | ### Features
2 |
3 | * Allow `/text/process` to render messages instead of posts, with a query parameter
4 | * File `kind` can be inferred from file extension
5 | * `io.pnut.core.channel-invite` raw now attaches the related channel's `name`, if a "chat" channel
6 | * Markdown links with titles will show `title` on the object, not just embedded in `html`
7 | * Users can specify link template used in notification E-mails
8 |
9 | ### Changes
10 |
11 | * Improved documentation for searches, and templatized API example responses
12 | * Known file extensions will be normalized lowercase
13 | * Ellipsis (`…`) is ignored at the end of inline links
14 | * Improved duplicate post handling
15 | * Links handle parentheses more naturally
16 | * Repost and bookmark E-mail notifications include the post's text
17 | * Developer accounts are now a one-time fee of $42, instead of an annual subscription
18 | * Tags can still include underscores in text and html, but lookups ignore them
19 |
20 | ### Fixes
21 |
22 | * Account data page wouldn't show usage for non-Badge-holders
23 | * Newly invited users did not register following the inviter
24 | * oEmbed `raw` was accepting strings and non-Integer numbers for image width and height
25 | * Gifted Pnut badges weren't accepted for one case
26 | * Authorizing new client email included an empty client name
27 | * `redirect_uri`s with special schemes (not "https") weren't recognized
28 | * Post and message length was calculated with an approximation, now it uses the same calculation as in actual rendering
29 | * Post search failed for some lookup combinations
30 |
31 | *Released 2018-12-31*
--------------------------------------------------------------------------------
/changes/0.9.3.md:
--------------------------------------------------------------------------------
1 | ### Features
2 |
3 | * E-mail "poll finished" notifications
4 | * JPEG images with EXIF data will be rotated, and EXIF data will be stripped
5 | * `GET /clients/{id}` includes the client's logo, if it has one
6 | * `io.pnut.core.chat`-type message RSS feeds include the channel's name in the title and description
7 |
8 | ### Changes
9 |
10 | * Poll responses can be changed until a poll closes
11 | * Any member of a private message can sticky messages for the group
12 | * E-mail notifications always include "canonical" links, even if custom links are set in notification settings
13 | * `suppress_notifications` on App Streams now includes muted users
14 |
15 | ### Fixes
16 |
17 | * Error updating user badges
18 |
19 | *Released 2019-04-07*
--------------------------------------------------------------------------------
/changes/0.9.4.md:
--------------------------------------------------------------------------------
1 | ### Features
2 |
3 | * `GET /sys/stats` includes `data.counts.users.today`, which is unique account IDs accessed in the current UTC day
4 | * Entities now include `gopher://` links in addition to `http://`, `https://`, and `ftp://`
5 | * Polls can optionally allow users to select multiple options, up to `max_options`
6 | * Channel search can be ordered by `popularity`--how many messages have been made in the channel
7 | * Channel search includes a basic text query of chat room names and descriptions
8 | * `io.pnut.core.fallback_url` added to `raw` elements
9 |
10 | ### Changes
11 |
12 | * Reposts include their reposted posts' `raw`
13 | * `GET /users/{id}/presence` and `GET /presence` return limited users including avatar image, username, name
14 | * `GET /token` now includes `markdown_text`
15 | * Account badge and payment pages have been reorganized
16 |
17 | ### Fixes
18 |
19 | * E-mail notifications for polls closing occurred regardless of notification setting
20 | * Notification custom links not recognized
21 | * Unmuting from Pnut.io
22 | * First-time authorization after TOTP login failing to return Oauth state
23 | * Post search and user file retrieval edge cases
24 | * Documentation includes examples for user streams
25 | * `markdown_text` on `GET /users/me` parsed some links improperly
26 |
27 | *Released 2019-08-03*
--------------------------------------------------------------------------------
/changes/0.9.5.md:
--------------------------------------------------------------------------------
1 | ### Features
2 |
3 | * New `video` file standardization, on file uploads and oembeds
4 | * Revert user images to defaults (`DELETE /users/me/cover` and `DELETE /users/me/avatar`)
5 | * Invites now include a link to a QR code image of the invite, in addition to the copyable link and E-mail options
6 | * When authorizing an app, users can directly uncheck requested permissions they do not want to allow
7 | * The website defaults to light-mode, and uses CSS preferences for showing dark-mode
8 | * Channel Search endpoint as RSS feed
9 |
10 | ### Changes
11 |
12 | * `io.pnut.core.crosspost`-type raw items expanded with options for external user representation
13 | * `embeddable_url` in oEmbeds now can use template URIs (`{object_id}`)
14 | * `max_options` on polls can now be the total number of options, instead of one less than the total
15 | * File `name` can be inferred from the uploaded file's name, if not included in the POST
16 | * When a user no longer has any access tokens for an app, the app's scopes will be revoked, and the user will have to re-authorize scopes the next time a token is created
17 | * Sending a message to User or App streams (websockets) will return a "pong" response
18 | * User and App streams require a "ping" every 60 seconds, instead of every 50 seconds
19 |
20 | ### Fixes
21 |
22 | * Personal data export files in zip file are now encoded properly for UTF-8
23 | * `https://photos.pnut.io/{post_id}/{image_placement_order}` and `https://photos.pnut.io/{file_id}` oembed links now temporarily redirect to post threads on Beta
24 | * Poll notifications could fire multiple times for a single participant
25 | * Saving Invite notes redirected to a 404
26 | * Upgrading to developer account failed
27 | * Some complex channel searches would fail
28 |
29 | *Released 2020-01-01*
--------------------------------------------------------------------------------
/changes/0.9.6.md:
--------------------------------------------------------------------------------
1 | *Released on *
2 |
3 | ### Features
4 |
5 | __Used invites view__ A musical interlude for music-lovers",
52 | "text": "A musical interlude for music-lovers"
53 | },
54 | "categories": ["community"]
55 | }
56 | ]
57 | }
58 | }
59 | ```
60 |
61 |
62 | More options for the raw item are found in the community git repository linked above.
63 |
64 | Creating a chat room is executed like any other channel, with [POST /channels](../resources/channels/lifecycle#post-channels).
65 |
66 | ### Optional Improvements to Rooms
67 |
68 | #### Image for the Room
69 |
70 | Images representing the room may be added with the [avatar image](https://github.com/pnut-api/object-metadata/blob/master/raw/io.pnut.core.channel.avatar.md) and [cover image](https://github.com/pnut-api/object-metadata/blob/master/raw/io.pnut.core.channel.cover.md).
71 |
72 | #### Broadcast to Global
73 |
74 | Clients often allow users to "broadcast" a message from a public channel to the Global post stream.
75 |
76 | To do that, create a post with a [channel invite](https://github.com/pnut-api/object-metadata/blob/master/raw/io.pnut.core.channel.invite.md) attached, referencing the channel ID.
77 |
78 | Then create an identical message in the channel, with a [broadcast notice](https://github.com/pnut-api/object-metadata/blob/master/raw/net.patter-app.broadcast.md) on it referencing the ID of the post that was just created.
79 |
80 | ####
--------------------------------------------------------------------------------
/how-to/dynamic-polling.md:
--------------------------------------------------------------------------------
1 | # How To Dynamically Update Polling Streams
2 |
3 | When polling a stream of posts like the global feed, or messages in a channel, there is a way to catch updates on deleted and revised posts.
4 |
5 | When polling using `since_id` pagination, the `meta` object on the stream will include lists `meta.deleted_ids` and `meta.revised_ids` if a post has been deleted or revised after the ID of `since_id` was created.
6 |
7 | For example: my client is making the request `curl "https://api.pnut.io/v1/posts/streams/global?since_id=500"`, when `500` is the latest post in the stream. Someone deletes their post `244`. The next time my client requests global with `since_id=500`, this is what I get back:
8 |
9 | ```json
10 | {
11 | "meta": {
12 | "more": false,
13 | "code": 200,
14 | "deleted_ids": [
15 | "244"
16 | ]
17 | },
18 | "data": []
19 | }
20 | ```
21 |
22 | Knowing this, my client can determine if post `244` is being displayed, and update its view to show that the post is now deleted.
23 |
24 | The same is true for revised posts, and deleted messages. The client, knowing that a post is revised, could automatically make a call to `GET /posts?ids=244`, for whatever posts were revised that were also being displayed.
25 |
26 | This is most useful when a client is polling forward, though; note that the sample of deleted and revised posts is not capped going forward. If you made a call with `since_id=200` and 40 posts had been deleted since post `200` was created, you would get all of those IDs. So it is not very useful when a client is pulling up old, cached posts (a fresh request of old posts would include the deleted or revised posts' most recent state, rendering "updates" like these irrelevant).
--------------------------------------------------------------------------------
/how-to/overview.md:
--------------------------------------------------------------------------------
1 | # How To
2 |
3 | Here be explanations of dragons.
4 |
5 | If there is an area of the API that usually has an expected or common pattern, or a place that is particularly tricky to get right, we will write an explanation as a How To.
6 |
7 | These are what we have so far:
8 |
9 | Code | 64 |Description | 65 |
---|---|
200 OK |
70 | The request was successful. | 71 |
204 No Content |
74 | Returned when retrieving an incomplete file or when uploading file content to an incomplete file. | 75 |
302 Found |
78 | Redirection to the final destination of a resource. Returned when retrieving user avatar, or a cover image. | 79 |
400 Bad Request |
82 | The API request was malformed in some way. A message should be returned that indicates how this request can be fixed. | 83 |
401 Unauthorized |
86 | A token is required. If you passed a token, a message should indicate why this token is not authorized. | 87 |
403 Forbidden |
90 | The token you are providing doesn't have the right to perform the request. Please check that your token is of the correct type and has the required scope. | 91 |
404 Not Found |
94 | The requested resource was not found. | 95 |
429 Too Many Requests |
98 | The request could not be completed due to a rate limit. Please wait at the number of seconds specified in the Retry-After header before you retry this request. |
99 |
500 Internal Server Error |
102 | An unexpected server error has occurred. Talk to pnut.io support to solve the issue. | 103 |
507 Insufficient Storage |
106 | The request couldn't be completed because the authorized user has hit a quota limit. This could be returned when trying to upload a file. The current token information's data.storage.available key can help an app avoid this error. |
107 |
Field | 95 |Type | 96 |Description | 97 |
---|---|---|
created_at |
100 | string | 101 |Time at which the operation was created, in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ. | 102 |
ended_at |
105 | string | 106 |Optional time at which the operation was completed, in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ. | 107 |
id |
110 | string | 111 |UUID that identifies the operation. | 112 |
type |
115 | string | 116 |Currently only file_delete |
117 |
status |
120 | string | 121 |One of running , dead , completed . |
122 |
Field | 25 |Type | 26 |Description | 27 |
---|---|---|
avatar_image |
30 | string | 31 |URL linking to the current avatar image. | 32 |
id |
35 | string | 36 |Primary identifier for the user that made the update. | 37 |
last_seen_at |
40 | string | 41 |Optional time at which the presence was updated, in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ. | 42 |
name |
45 | string | 46 |Optional user-supplied name. All Unicode characters allowed. Maximum length 50 characters. Be sure to escape if necessary. | 47 |
presence |
50 | string | 51 |Updated user presence, up to 100 characters. | 52 |
username |
55 | string | 56 |Username of the user that made the update. Case sensitive. 20 characters, may only contain a-z, 0-9 and underscore. | 57 |