GET /oauth/admin/grants/{GrantID}

Returns detailed information about the specified OAuth grant, including the list of scopes.

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}

Sample Request

The example below shows a request for the grant details for the specified grant.

Sample Request URL

https://{oauth-provider-url}/oauth/admin/grants/udejlge35gg2

Sample request headers

Host: {oauth-provider-hostname}
Accept: application/json
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 application/json
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.

Response

If successful, this operation returns HTTP status code 200, with the grant details.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Expires: Wed, 26 Aug 2015 15:55:38 GMT

Sample response body: application/json

{
  "GrantID" : "c1gnja6hkvr6",
  "GrantProvider" : "OAuthAutomationacmepaymentscorp",
  "GrantType" : "authorization_code",
  "OpenIdConnectGrant" : false,
  "GrantStatus" : "Cancelled",
  "GrantExpirationDateTime" : 1441918216000,
  "GrantExpirationDateTimeInMillis" : 1441918216000,
  "GrantClient" : {
    "ClientID" : "acmepaymentscorp-2oU1RtQxoS97NXPwe7fQmYAY"
  },
  "GrantClientRedirectUri" : "http://acmepaymentscorp.com:9900/",
  "ResourceOwnerUserInfo" : {
    "DomainName" : "Ldapacmepaymentscorp",
    "UID" : "eng99"
  },
  "GrantResourceScope" : {
    "Resource" : [ {
      "Name" : "Scope1"
    } ]
  },
  "GrantIssuedDateTime" : 1440622216000,
  "GrantIssuedDateTimeInMillis" : 1440622216000,
  "GrantUpdatedDateTime" : 1440622217000,
  "GrantUpdatedDateTimeInMillis" : 1440622217000,
  "ResponseType" : "code"
}

Response Headers

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

Header Description
Content-Type application/json

Response Body

Name Type Description
Grant Grant Contains information about an OAuth grant.

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.