Skip to main content
The API object for the credentials-exchange Actions trigger includes:

api.access

Control availability to the access token.

api.access.deny(code, reason)

Mark the current token exchange as denied. Parameters

api.accessToken

Request changes to the access token being issued.

api.accessToken.setCustomClaim(key, value)

Set a custom claim on the Access Token that will be issued. Parameters

api.cache

Make changes to the cache.

api.cache.delete(key)

Delete a record describing a cached value at the supplied key if it exists. Parameters

api.cache.get(key)

Retrieve a record describing a cached value at the supplied key, if it exists. If a record is found, the cached value can be found at the value property of the returned object. Parameters

api.cache.set(key, value, options)

Store or update a string value in the cache at the specified key. Values stored in this cache are scoped to the Trigger in which they are set. They are subject to the Actions Cache Limits. Values stored in this way will have lifetimes of up to the specified ttl or expires_at values. If no lifetime is specified, a default of lifetime of 15 minutes will be used. Lifetimes may not exceed the maximum duration listed at Actions Cache Limits. Important: This cache is designed for short-lived, ephemeral data. Items may not be available in later transactions even if they are within their supplied their lifetime. Parameters

api.transaction

[Early Access] Make changes to the transaction.

api.transaction.addTargetScope(scope)

[Early Access] Add a scope to the target scope set. Added scopes are intersected with the client grant after all Actions complete. Scopes not present in the grant are silently dropped from the final access token.
Parameters

api.transaction.removeTargetScope(scope)

[Early Access] Remove a scope from the target scope set.
Parameters

api.transaction.setTargetScopes(scopes)

[Early Access] Replace the entire target scope set. The new scopes are intersected with the client grant after all Actions complete. Scopes not present in the grant are silently dropped from the final access token.
Parameters

api.transaction.clearTargetScopes()

[Early Access] Remove all scopes from the target scope set.