GET /oauth/admin/grants/{GrantID}/client/picture

Returns the avatar for the client app associated with the specified OAuth Grant ID. For example, this could be used to create a page showing the resource owner a summary of grants that are currently authorized.

Note: GET /oauth/admin/clients/{ClientID}/picture and GET /oauth/admin/grants/{GrantID}/client/picture (this operation) 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/grants/{GrantID}/client/picture

Sample Request

The example below shows a request for the avatar for the client that the specified grant relates to.

Sample Request URL

https://{oauth-provider-url}/oauth/admin/grants/j5qpu6hquiu/client/picture

Sample request headers

GET http://{oauth-provider-hostname}/oauth/admin/grants/j5qpu6hquiu/client/picture HTTP/1.1
Host: {oauth-provider-hostname}
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
GrantID Path string Required The unique ID for a specific instance of an OAuth grant.
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.

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: Wed, 26 Aug 2015 15:24:11 GMT

Sample response body

The response body is the image file for the client avatar.

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 image file for the client avatar.

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.