GET /oauth/admin/clients/{ClientID}/picture

Returns the avatar for the specified OAuth client, based on the Client ID.

Note: GET /oauth/admin/clients/{ClientID}/picture (this operation) and GET /oauth/admin/grants/{GrantID}/client/picture perform the same function, retrieving the client avatar. Each references a different resource type in the URL; ClientID or GrantID.

Authorization Roles/Permissions: Must be the resource owner, provider admin, or client admin. Authentication cookie is required.

This topic includes the following sections:

HTTP Method

GET

URL

https://{oauth-provider-url}/oauth/admin/{ClientID}/picture

Sample Request

The example below shows a request for the avatar for the specified client.

Sample Request URL

https://{oauth-provider-url}/oauth/admin/clients/acmepaymentscorp-ASjFBZlAaEj39cXn8gy5Jd7e/picture

Sample request headers

GET http://{oauth-provider-hostname}/oauth/admin/clients/acmepaymentscorp-ASjFBZlAaEj39cXn8gy5Jd7e/picture HTTP/1.0
Host: {oauth-provider-hostname}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Cookie: OAuthToken_{OAuthProviderName}={Cookie value (usually starts with TokenID)}

Sample request body

Not applicable.

Request Headers

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

Header Description
Accept image/jpg
Cookie OAuthToken_{OAuthProviderName}—The OAuth cookie that identifies the logged-in user with the provider. Depending on the operation being used and the context, the authenticated user could be the resource owner, the administrator, the client app administration, or the OAuth Provider. The cookie is returned after logging in with the POST /oauth/login operation.

Request Parameters

Parameter Parm Type Data Type Required Description
ClientID Path string Required The unique ID for a specific OAuth client, as set up with the OAuth Provider. In the context of the platform, the ClientID is the same as the app's RuntimeID.
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.

Response

If successful, this operation returns HTTP status code 200, with the client avatar. If no avatar is set up for the client app, the default avatar is returned.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Content-Type: image/jpeg
Expires: Fri, 31 Jul 2015 13:54:25 GMT

Sample response body

The response body is the avatar image.

Response Headers

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

Header Description
Content-Type image/jpg

Response Body

The response body is the avatar image.

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 OAuthToken_{OAuthProviderName} cookie, or if you included an invalid cookie.
500 An error occurred processing the call.

More information about Akana OAuth API error messages.