GET /api/apps/versions/{AppVersionID}/publicprofile/picture

Retrieves the image associated with an app version's public profile. If there is no custom image on the app's public profile, the platform's default image is returned.

Note: the image for the public profile is not the necessarily the same as the avatar for the app itself. To retrieve the avatar for the app, use the GET /api/apps/{AppID}/avatar operation.

Authorization Roles/Permissions: App team member, Business Admin, or Site Admin.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/apps/versions/{AppVersionID}/publicprofile/picture

Sample Request

The example below shows a request for the avatar image for the specified app version.

Sample Request URL

https://{hostname}/api/apps/versions/90VsIX3WmpP32sqoYQk8jj4J.acmepaymentscorp/publicprofile/picture?cache=false&size=75

Sample request headers

GET /api/apps/versions/90VsIX3WmpP32sqoYQk8jj4J.acmepaymentscorp/publicprofile/picture?cache=false&size=75&time=1373317792745 HTTP/1.1
Host: {hostname}
Accept: image/png,image/*;q=0.8,*/*;q=0.5

Sample request body

Not applicable.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept image/jpeg
Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

Parameter Parm Type Data Type Required Description
AppVersionID Path string Required The unique ID for a specific app version.
size Query integer Required The size, in pixels, for the width or height of the avatar image (the image should always be square). We recommend a size of 75 pixels.
FallbackToAppAvatar Query boolean Optional Indicates whether, if an image was uploaded for the app but not for the app public profile, the app image should be used for the public profile. Default: false.

Response

If successful, this operation returns HTTP status code 200, with the requested avatar image.

Sample Response

The sample response below shows successful completion of this request.

Sample response headers

HTTP/1.1 200 OK
Content-Type: image/jpeg
Date: Tue, 20 May 2014 09:44:30 GMT

Sample response body

The response is the avatar image.

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type image/jpeg

Response Body

Name Type Description
Avatar Image The avatar image for the specified app version.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
406 Returned if the request format is not acceptable. For example, you would get this response if you use the AppID instead of the AppVersionID in the request.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.