Updates a specific user’s profile details. You can update a user by PUTing an object that matches the User schema with an HTTP header of Content-Type: application/json
. You must provide values for each of the following keys: name
, locale
, timezone
, and description
. If you would only like to update a subset of those keys, you can also partially update a user.
For the description, you must specify description.text
as a child key. You can also specify custom links for a user description. If you want to test how your text will be processed you can use the text processor.
If you want to add or update a User’s annotations, you may include the optional annotations
key and pass in the annotations that are changing.
This endpoint responds to general User parameters.
Method | URL | Token | Scope |
---|---|---|---|
PUT | https://alpha-api.app.net/stream/0/users/me | User | update_profile |
curl -X PUT -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
-H "Content-Type: application/json" -d "{
\"name\": \"@adnapi has a new name\",
\"locale\": \"en\",
\"timezone\": \"US/Central\",
\"description\": {
\"text\": \"new description\"
},
\"annotations\": [
{
\"type\": \"net.app.core.directory.blog\",
\"value\": {
\"url\": \"http://mynewblog.com\"
}
}
]
}" \
"https://alpha-api.app.net/stream/0/users/me?include_user_annotations=1"
{
"data": {
"avatar_image": {
"height": 200,
"is_default": false,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/aoveeP73f33UcFhyhqzn7VhwgS17InMiOiJzMyIsImIiOiJhZG4tdXNlci1hc3NldHMiLCJrIjoiYXNzZXRzL3VzZXIvOTkvYTYvNDAvOTlhNjQwMDAwMDAwMDAwMC5wbmciLCJvIjoiIn0",
"width": 200
},
"canonical_url": "https://alpha.app.net/adnapi",
"counts": {
"followers": 1549,
"following": 12,
"posts": 115,
"stars": 4
},
"cover_image": {
"height": 260,
"is_default": true,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/kZ-JRmTbmd3WVPswTJ8Nwxzkf917InMiOiJzMyIsImIiOiJ0YXBwLWFzc2V0cyIsImsiOiJpL1UvaS9ZL1VpWW5xRFNvTUtyTEhLNXA0OHN2NkxmTmRVMC5qcGciLCJvIjoiIn0",
"width": 960
},
"created_at": "2012-08-10T22:40:12Z",
"description": {
"entities": {
},
"html": "new description",
"text": "new description"
},
"id": "1558",
"locale": "en_US",
"name": "@adnapi has a new name",
"timezone": "US/Central",
"type": "human",
"username": "adnapi",
"verified_domain": "developers.app.net",
"annotations": [
{
"type": "net.app.core.directory.blog",
"value": {
"url": "http://mynewblog.com"
}
}
]
},
"meta": {
"code": 200
}
}
Updates a subset of a specific user’s profile details. You can update a user by passing the keys you’d like to update from the User schema with an HTTP header of Content-Type: application/json
. You can also specify custom links for a user description. If you want to test how your text will be processed you can use the text processor.
This endpoint responds to general User parameters.
Method | URL | Token | Scope |
---|---|---|---|
PATCH | https://alpha-api.app.net/stream/0/users/me | User | update_profile |
curl -X PATCH -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
-H "Content-Type: application/json" -d "{
\"name\": \"Mark Thurman 3\"
}" \
"https://alpha-api.app.net/stream/0/users/me"
{
"data": {
"avatar_image": {
"height": 200,
"is_default": false,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/aoveeP73f33UcFhyhqzn7VhwgS17InMiOiJzMyIsImIiOiJhZG4tdXNlci1hc3NldHMiLCJrIjoiYXNzZXRzL3VzZXIvOTkvYTYvNDAvOTlhNjQwMDAwMDAwMDAwMC5wbmciLCJvIjoiIn0",
"width": 200
},
"canonical_url": "https://alpha.app.net/adnapi",
"counts": {
"followers": 1549,
"following": 12,
"posts": 115,
"stars": 4
},
"cover_image": {
"height": 260,
"is_default": true,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/kZ-JRmTbmd3WVPswTJ8Nwxzkf917InMiOiJzMyIsImIiOiJ0YXBwLWFzc2V0cyIsImsiOiJpL1UvaS9ZL1VpWW5xRFNvTUtyTEhLNXA0OHN2NkxmTmRVMC5qcGciLCJvIjoiIn0",
"width": 960
},
"created_at": "2012-08-10T22:40:12Z",
"description": {
"entities": {
"hashtags": [
],
"links": [
{
"len": 7,
"pos": 31,
"text": "App.net",
"url": "http://App.net"
}
],
"mentions": [
]
},
"html": "<span itemscope=\"https://app.net/schemas/Post\">Updating you on changes to the <a href=\"http://App.net\">App.net</a> API</span>",
"text": "Updating you on changes to the App.net API"
},
"id": "1558",
"locale": "en_US",
"name": "Mark Thurman 3",
"timezone": "America/Los_Angeles",
"type": "human",
"username": "adnapi",
"verified_domain": "developers.app.net"
},
"meta": {
"code": 200
}
}
Retrieve a User’s avatar image. This endpoint does not require authentication, is not rate limited, and will return an HTTP 302 redirect to the user’s current avatar image. It will include any query string parameters you pass to the endpoint.
Method | URL | Token |
---|---|---|
GET | https://alpha-api.app.net/stream/0/users/{user_id}/avatar | None |
Name | Description |
---|---|
user_id |
The user id. If the user id is me the current authenticated user will be used. You can also specify @username as a user_id . |
curl -L -H "Authorization: Bearer <YOUR ACCESS TOKEN>" "https://alpha-api.app.net/stream/0/users/me/avatar"
<the binary contents of your avatar image>
Replace a User’s avatar image with the uploaded file. The uploaded image Will be cropped to square and must be smaller than 1 MB. The optimal size for this image is 200×200 pixels. The content type for this request must be multipart/form-data
.
Method | URL | Token | Scope |
---|---|---|---|
POST | https://alpha-api.app.net/stream/0/users/me/avatar | User | update_profile |
Name | Required? | Type | Description |
---|---|---|---|
avatar |
Required | string | The MIME encoded image to replace the current user's image. |
curl -X POST -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
-F "avatar=@new_avatar_image.jpg" "https://alpha-api.app.net/stream/0/users/me/avatar"
{
"data": {
"avatar_image": {
"height": 200,
"is_default": false,
"url": "https://example.com/new_avatar_image.jpg",
"width": 200
},
"canonical_url": "https://alpha.app.net/adnapi",
"counts": {
"followers": 1549,
"following": 12,
"posts": 115,
"stars": 4
},
"cover_image": {
"height": 260,
"is_default": true,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/kZ-JRmTbmd3WVPswTJ8Nwxzkf917InMiOiJzMyIsImIiOiJ0YXBwLWFzc2V0cyIsImsiOiJpL1UvaS9ZL1VpWW5xRFNvTUtyTEhLNXA0OHN2NkxmTmRVMC5qcGciLCJvIjoiIn0",
"width": 960
},
"created_at": "2012-08-10T22:40:12Z",
"description": {
"entities": {
"hashtags": [
],
"links": [
{
"len": 7,
"pos": 31,
"text": "App.net",
"url": "http://App.net"
}
],
"mentions": [
]
},
"html": "<span itemscope=\"https://app.net/schemas/Post\">Updating you on changes to the <a href=\"http://App.net\">App.net</a> API</span>",
"text": "Updating you on changes to the App.net API"
},
"id": "1558",
"locale": "en_US",
"name": "ADN API",
"timezone": "America/Los_Angeles",
"type": "human",
"username": "adnapi",
"verified_domain": "developers.app.net"
},
"meta": {
"code": 200
}
}
Retrieve a User’s cover image. This endpoint does not require authentication, is not rate limited, and will return an HTTP 302 redirect to the user’s current cover image. It will include any query string parameters you pass to the endpoint.
Method | URL | Token |
---|---|---|
GET | https://alpha-api.app.net/stream/0/users/{user_id}/cover | None |
Name | Description |
---|---|
user_id |
The user id. If the user id is me the current authenticated user will be used. You can also specify @username as a user_id . |
curl -L -H "Authorization: Bearer <YOUR ACCESS TOKEN>" "https://alpha-api.app.net/stream/0/users/me/cover"
<the binary contents of your cover image>
Replace a User’s cover image with the uploaded file. The uploaded image must be at least 960px wide and less than 4 MB in size. The content type for this request must be multipart/form-data
.
This endpoint responds to general User parameters.
Method | URL | Token | Scope |
---|---|---|---|
POST | https://alpha-api.app.net/stream/0/users/me/cover | User | update_profile |
Name | Required? | Type | Description |
---|---|---|---|
cover |
Required | string | The MIME encoded image to replace the current user's image. |
curl -X POST -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
-F "cover=@new_cover_image.jpg" "https://alpha-api.app.net/stream/0/users/me/cover"
{
"data": {
"avatar_image": {
"height": 200,
"is_default": false,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/aoveeP73f33UcFhyhqzn7VhwgS17InMiOiJzMyIsImIiOiJhZG4tdXNlci1hc3NldHMiLCJrIjoiYXNzZXRzL3VzZXIvOTkvYTYvNDAvOTlhNjQwMDAwMDAwMDAwMC5wbmciLCJvIjoiIn0",
"width": 200
},
"canonical_url": "https://alpha.app.net/adnapi",
"counts": {
"followers": 1549,
"following": 12,
"posts": 115,
"stars": 4
},
"cover_image": {
"height": 260,
"is_default": true,
"url": "https://example.com/new_cover_image.jpg",
"width": 960
},
"created_at": "2012-08-10T22:40:12Z",
"description": {
"entities": {
"hashtags": [
],
"links": [
{
"len": 7,
"pos": 31,
"text": "App.net",
"url": "http://App.net"
}
],
"mentions": [
]
},
"html": "<span itemscope=\"https://app.net/schemas/Post\">Updating you on changes to the <a href=\"http://App.net\">App.net</a> API</span>",
"text": "Updating you on changes to the App.net API"
},
"id": "1558",
"locale": "en_US",
"name": "ADN API",
"timezone": "America/Los_Angeles",
"type": "human",
"username": "adnapi",
"verified_domain": "developers.app.net"
},
"meta": {
"code": 200
}
}