def get(timeout: nil)def get: (?timeout: seconds?) -> identity_resourceReturns the user the key belongs to, the workspace it is bound to, and a summary of the key itself. This is the only method that needs no scope, so it works with any valid key and is the cheapest way to check that a credential is still live.
Use it at startup to discover workspaceId, which you need for every encryption and decryption call. A key is permanently bound to one workspace, so this value never changes for a given key and is safe to cache for the process lifetime.
Example
require "envless/sdk"
identity = Envless.me.get
puts identity[:user][:email]
puts identity[:workspaceId]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timeout: | Integer | Float | Rational | No | Seconds each attempt of this call may take, redirects and the response body included, before it raises Envless::NetworkError with timeout? set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
identity_resource with user, workspaceId and key.
Worth knowing
keyisnilonly when the request was authenticated by something other than an API key.- A failure here means the credential itself is bad. Every other method would fail the same way.
Required scopes
None. Any valid API key can call this.
Underlying endpoint
GET /me
Request and response schema, every error code, and a live playground.
In TypeScript
envless.me.get()
The same method in @goenvless/sdk, with the same request, retries and errors.