Retrieve an OAuth2 credential

Retrieves an OAuth2 credential with a specified token ID.

SecuritySecretApiKey or JWT
Request
path Parameters
hash
required
string

ID of the token.

Responses
200

OAuth2 credential retrieved.

Response Schema: application/json
code
required
string

OAuth2 code provided by the authentication server.

scopes
required
Array of strings

List of URLs that are granted OAuth2 access.

service
required
string

Name of the service to which the OAuth2 credential relates.

Value: "google-sheets"
hash
string <= 50 characters

Unique resource ID. Defaults to UUID v4.

status
string

Status of the credential.

Enum: Description
active

Credential is active and can be used.

inactive

Credential is temporarily inactivated and cannot be used until reactivated.

deactivated

Credential is permanently deactivated and cannot be reactivated.

deactivationTime
string <date-time>

Date and time when the credential is deactivated.

accessToken
string

OAuth2 access token.

refreshToken
string

OAuth2 refresh token.

Array of Self (object) non-empty

Related resource links.

Array (non-empty)
Any of:
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

get/credential-hashes/oauth2/{hash}
Request samples
Response samples
application/json
{
  • "hash": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "status": "active",
  • "deactivationTime": "2019-08-24T14:15:22Z",
  • "service": "google-sheets",
  • "code": "2/smAHUUr9jOxw_IOp47Y_dH1r2Y",
  • "accessToken": "zw34.PltIPtJZHmEgZS9R4RoGpzaRrJd5MYjZIONQ2MjWSCj7N7Iqp9BXXFIbkhDRfAPs6cB1pKtTjLUgb3ofzgHUprJfnRiMDTnB_yPMK7vtgobCX4SUs7fhrR6bdApq",
  • "refreshToken": "2/4DPERp2EiySF6JUIOTS4jM5f0JmLG2gPcpGaWYTGU94",
  • "_links": [
    ]
}