Skip to main content

oauth_clients

Creates, updates, deletes, gets or lists an oauth_clients resource.

Overview

Nameoauth_clients
TypeResource
Idlinode.account.oauth_clients

Fields

The following fields are returned by SELECT queries:

Information about the requested client.

NameDatatypeDescription
idstringRead-only The OAuth Client ID. This is used to identify the client, and is a publicly known value (it is not a secret). (example: 2737bf16b39ab5d7b4a1)
labelstringFilterable The name of this application. This will be presented to users when they are asked to grant it access to their Account. (example: Test_Client_1)
publicbooleanFilterable If this is a public or private OAuth Client. Public clients have a slightly different authentication workflow than private clients. See the OAuth spec for more details.
redirect_uristring (url)The location a successful log in from login.linode.com should be redirected to for this client. The receiver of this redirect should be ready to accept an OAuth exchange code and finish the OAuth exchange. (example: https://example.org/oauth/callback)
secretstringRead-only The OAuth Client secret, used in the OAuth exchange. This is returned as <REDACTED> except when an OAuth Client is created or its secret is reset. This is a secret, and should not be shared or disclosed publicly. (example: <REDACTED>)
statusstringRead-only The status of this application. active by default. (example: active)
thumbnail_urlstring (url)Read-only The URL where this client's thumbnail may be viewed, or null if this client does not have a thumbnail set. (example: https://api.linode.com/v4/account/clients/2737bf16b39ab5d7b4a1/thumbnail)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_clientselectReturns information about a single OAuth client.

Learn more...

Learn more...
get_clientsselectpage, page_sizeReturns a paginated list of OAuth Clients registered to your Account. OAuth Clients allow users to log into applications you write or host using their Linode Account, and may allow them to grant some level of access to their Linodes or other entities to your application.

Learn more...

Learn more...
post_clientinsertdata__label, data__redirect_uriCreates an OAuth Client, which can be used to allow users (using their Linode account) to log in to your own application, and optionally grant your application some amount of access to their Linodes or other entities.

Learn more...

Learn more...
put_clientreplaceUpdate information about an OAuth Client on your Account. This can be especially useful to update the redirect_uri of your client in the event that the callback URL changed in your application.

Learn more...

Learn more...
delete_clientdeleteDeletes an OAuth Client registered with Linode. The Client ID and Client secret will no longer be accepted by login.linode.com, and all tokens issued to this client will be invalidated (meaning that if your application was using a token, it will no longer work).

Learn more...

Learn more...
post_reset_client_secretexecResets the OAuth Client secret for a client you own, and returns the OAuth Client with the plaintext secret. This secret is not supposed to be publicly known or disclosed anywhere. This can be used to generate a new secret in case the one you have has been leaked, or to get a new secret if you lost the original. The old secret is expired immediately, and logins to your client with the old secret will fail.

Learn more...

Learn more...
get_client_thumbnailexecReturns the PNG thumbnail for this OAuth Client. This is a publicly viewable endpoint, and can be accessed without authentication.
put_client_thumbnailexecUpload a thumbnail for a client you own. You must upload a PNG image file that will be returned when the thumbnail is retrieved. This image will be publicly viewable. OAuth scopes.

<br /> account:read_write<br />

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
pageintegerThe page of a collection to return.
page_sizeintegerThe number of items to return per page.

SELECT examples

Returns information about a single OAuth client.

Learn more...

Learn more...

SELECT
id,
label,
public,
redirect_uri,
secret,
status,
thumbnail_url
FROM linode.account.oauth_clients;

INSERT examples

Creates an OAuth Client, which can be used to allow users (using their Linode account) to log in to your own application, and optionally grant your application some amount of access to their Linodes or other entities.

Learn more...

Learn more...

INSERT INTO linode.account.oauth_clients (
data__label,
data__public,
data__redirect_uri
)
SELECT
'{{ label }}' --required,
{{ public }},
'{{ redirect_uri }}' --required
RETURNING
id,
label,
public,
redirect_uri,
secret,
status,
thumbnail_url
;

REPLACE examples

Update information about an OAuth Client on your Account. This can be especially useful to update the redirect_uri of your client in the event that the callback URL changed in your application.

Learn more...

Learn more...

REPLACE linode.account.oauth_clients
SET
data__label = '{{ label }}',
data__public = {{ public }},
data__redirect_uri = '{{ redirect_uri }}'
WHERE

RETURNING
id,
label,
public,
redirect_uri,
secret,
status,
thumbnail_url;

DELETE examples

Deletes an OAuth Client registered with Linode. The Client ID and Client secret will no longer be accepted by login.linode.com, and all tokens issued to this client will be invalidated (meaning that if your application was using a token, it will no longer work).

Learn more...

Learn more...

DELETE FROM linode.account.oauth_clients;

Lifecycle Methods

Resets the OAuth Client secret for a client you own, and returns the OAuth Client with the plaintext secret. This secret is not supposed to be publicly known or disclosed anywhere. This can be used to generate a new secret in case the one you have has been leaked, or to get a new secret if you lost the original. The old secret is expired immediately, and logins to your client with the old secret will fail.

Learn more...

Learn more...

EXEC linode.account.oauth_clients.post_reset_client_secret 
;