From eebcc84a9b33d18c2f44113e5c8610567082282b Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 12 Jun 2025 16:51:14 -0700 Subject: [PATCH 1/4] Add code sample for /user_identities/generate_instant_key --- .../user-identities.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/data/code-sample-definitions/user-identities.yaml b/src/data/code-sample-definitions/user-identities.yaml index 6a803916e..84330d009 100644 --- a/src/data/code-sample-definitions/user-identities.yaml +++ b/src/data/code-sample-definitions/user-identities.yaml @@ -266,3 +266,20 @@ enrollment_automation_id: '05505650-aa57-49ab-8f19-429738758895' response: body: null + +- title: Generate an Instant Key + description: Specify the user_identity_id to receive the instant key. + request: + path: /user_identities/generate_instant_key + parameters: + user_identity_id: '5c945ab5-c75e-4bcb-8e5f-9410061c401f' + response: + body: + instant_key: + instant_key_id: '33fb0384-b2b3-445e-b780-3fad784e9baa' + instant_key_url: 'https://ik.seam.co/EXAMPLE' + user_identity_id: '48500a8e-5e7e-4bde-b7e5-0be97cae5d7a' + client_session_id: '7cc9b16b-d139-45e2-8042-5cef6ee101ea' + workspace_id: '398d80b7-3f96-47c2-b85a-6f8ba21d07be' + created_at: '2024-01-09T05:45:33.068Z' + expires_at: '2024-02-09T05:45:33.068Z' From 3777d67296427699a45f574fce651f47e840edf7 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 12 Jun 2025 23:53:28 +0000 Subject: [PATCH 2/4] ci: Generate docs --- docs/api/_blueprint.json | 100 ++++++++- docs/api/_report.md | 1 - .../user_identities/generate_instant_key.md | 203 ++++++++++++++++++ 3 files changed, 302 insertions(+), 2 deletions(-) diff --git a/docs/api/_blueprint.json b/docs/api/_blueprint.json index 19418b33a..2491db7b3 100644 --- a/docs/api/_blueprint.json +++ b/docs/api/_blueprint.json @@ -31457,7 +31457,105 @@ "personal_access_token" ], "workspaceScope": "required", - "codeSamples": [] + "codeSamples": [ + { + "title": "Generate an Instant Key", + "description": "Specify the user_identity_id to receive the instant key.", + "request": { + "path": "/user_identities/generate_instant_key", + "parameters": { + "user_identity_id": "5c945ab5-c75e-4bcb-8e5f-9410061c401f" + } + }, + "response": { + "body": { + "instant_key": { + "instant_key_id": "33fb0384-b2b3-445e-b780-3fad784e9baa", + "instant_key_url": "https://ik.seam.co/EXAMPLE", + "user_identity_id": "48500a8e-5e7e-4bde-b7e5-0be97cae5d7a", + "client_session_id": "7cc9b16b-d139-45e2-8042-5cef6ee101ea", + "workspace_id": "398d80b7-3f96-47c2-b85a-6f8ba21d07be", + "created_at": "2024-01-09T05:45:33.068Z", + "expires_at": "2024-02-09T05:45:33.068Z" + } + } + }, + "code": { + "javascript": { + "title": "JavaScript", + "sdkName": "javascript", + "request": "await seam.userIdentities.generateInstantKey({\n user_identity_id: \"5c945ab5-c75e-4bcb-8e5f-9410061c401f\",\n});", + "response": "{\n \"instant_key_id\": \"33fb0384-b2b3-445e-b780-3fad784e9baa\",\n \"instant_key_url\": \"https://ik.seam.co/EXAMPLE\",\n \"user_identity_id\": \"48500a8e-5e7e-4bde-b7e5-0be97cae5d7a\",\n \"client_session_id\": \"7cc9b16b-d139-45e2-8042-5cef6ee101ea\",\n \"workspace_id\": \"398d80b7-3f96-47c2-b85a-6f8ba21d07be\",\n \"created_at\": \"2024-01-09T05:45:33.068Z\",\n \"expires_at\": \"2024-02-09T05:45:33.068Z\"\n}", + "request_syntax": "javascript", + "response_syntax": "json" + }, + "python": { + "title": "Python", + "sdkName": "python", + "request": "seam.user_identities.generate_instant_key(\n user_identity_id=\"5c945ab5-c75e-4bcb-8e5f-9410061c401f\"\n)", + "response": "InstantKey(\n instant_key_id=\"33fb0384-b2b3-445e-b780-3fad784e9baa\",\n instant_key_url=\"https://ik.seam.co/EXAMPLE\",\n user_identity_id=\"48500a8e-5e7e-4bde-b7e5-0be97cae5d7a\",\n client_session_id=\"7cc9b16b-d139-45e2-8042-5cef6ee101ea\",\n workspace_id=\"398d80b7-3f96-47c2-b85a-6f8ba21d07be\",\n created_at=\"2024-01-09T05:45:33.068Z\",\n expires_at=\"2024-02-09T05:45:33.068Z\",\n)", + "request_syntax": "python", + "response_syntax": "python" + }, + "ruby": { + "title": "Ruby", + "sdkName": "ruby", + "request": "seam.user_identities.generate_instant_key(user_identity_id: \"5c945ab5-c75e-4bcb-8e5f-9410061c401f\")", + "response": "{\n \"instant_key_id\" => \"33fb0384-b2b3-445e-b780-3fad784e9baa\",\n \"instant_key_url\" => \"https://ik.seam.co/EXAMPLE\",\n \"user_identity_id\" => \"48500a8e-5e7e-4bde-b7e5-0be97cae5d7a\",\n \"client_session_id\" => \"7cc9b16b-d139-45e2-8042-5cef6ee101ea\",\n \"workspace_id\" => \"398d80b7-3f96-47c2-b85a-6f8ba21d07be\",\n \"created_at\" => \"2024-01-09T05:45:33.068Z\",\n \"expires_at\" => \"2024-02-09T05:45:33.068Z\",\n}", + "request_syntax": "ruby", + "response_syntax": "ruby" + }, + "php": { + "title": "PHP", + "sdkName": "php", + "request": "user_identities->generate_instant_key(\n user_identity_id: \"5c945ab5-c75e-4bcb-8e5f-9410061c401f\"\n);", + "response": " \"33fb0384-b2b3-445e-b780-3fad784e9baa\",\n \"instant_key_url\" => \"https://ik.seam.co/EXAMPLE\",\n \"user_identity_id\" => \"48500a8e-5e7e-4bde-b7e5-0be97cae5d7a\",\n \"client_session_id\" => \"7cc9b16b-d139-45e2-8042-5cef6ee101ea\",\n \"workspace_id\" => \"398d80b7-3f96-47c2-b85a-6f8ba21d07be\",\n \"created_at\" => \"2024-01-09T05:45:33.068Z\",\n \"expires_at\" => \"2024-02-09T05:45:33.068Z\",\n];", + "request_syntax": "php", + "response_syntax": "php" + }, + "seam_cli": { + "title": "Seam CLI", + "sdkName": "seam_cli", + "request": "seam user-identities generate-instant-key --user_identity_id \"5c945ab5-c75e-4bcb-8e5f-9410061c401f\"", + "response": "{\n \"instant_key_id\": \"33fb0384-b2b3-445e-b780-3fad784e9baa\",\n \"instant_key_url\": \"https://ik.seam.co/EXAMPLE\",\n \"user_identity_id\": \"48500a8e-5e7e-4bde-b7e5-0be97cae5d7a\",\n \"client_session_id\": \"7cc9b16b-d139-45e2-8042-5cef6ee101ea\",\n \"workspace_id\": \"398d80b7-3f96-47c2-b85a-6f8ba21d07be\",\n \"created_at\": \"2024-01-09T05:45:33.068Z\",\n \"expires_at\": \"2024-02-09T05:45:33.068Z\"\n}", + "request_syntax": "bash", + "response_syntax": "json" + }, + "go": { + "title": "Go", + "sdkName": "go", + "request": "package main\n\nimport api \"github.com/seamapi/go\"\n\nfunc main() {\n\tclient.UserIdentities.GenerateInstantKey(\n\t\tcontext.Background(),\n\t\tapi.UserIdentitiesGenerateInstantKeyRequest{\n\t\t\tUserIdentityId: api.String(\"5c945ab5-c75e-4bcb-8e5f-9410061c401f\"),\n\t\t},\n\t)\n}", + "response": "api.InstantKey{InstantKeyId: \"33fb0384-b2b3-445e-b780-3fad784e9baa\", InstantKeyUrl: \"https://ik.seam.co/EXAMPLE\", UserIdentityId: \"48500a8e-5e7e-4bde-b7e5-0be97cae5d7a\", ClientSessionId: \"7cc9b16b-d139-45e2-8042-5cef6ee101ea\", WorkspaceId: \"398d80b7-3f96-47c2-b85a-6f8ba21d07be\", CreatedAt: \"2024-01-09T05:45:33.068Z\", ExpiresAt: \"2024-02-09T05:45:33.068Z\"}", + "request_syntax": "go", + "response_syntax": "go" + }, + "java": { + "title": "Java", + "sdkName": "java", + "request": "seam.userIdentities().generateInstantKey(UserIdentitiesGenerateInstantKeyRequest.builder().userIdentityId(\"5c945ab5-c75e-4bcb-8e5f-9410061c401f\").build());", + "response": "{\n \"instant_key_id\": \"33fb0384-b2b3-445e-b780-3fad784e9baa\",\n \"instant_key_url\": \"https://ik.seam.co/EXAMPLE\",\n \"user_identity_id\": \"48500a8e-5e7e-4bde-b7e5-0be97cae5d7a\",\n \"client_session_id\": \"7cc9b16b-d139-45e2-8042-5cef6ee101ea\",\n \"workspace_id\": \"398d80b7-3f96-47c2-b85a-6f8ba21d07be\",\n \"created_at\": \"2024-01-09T05:45:33.068Z\",\n \"expires_at\": \"2024-02-09T05:45:33.068Z\"\n}", + "request_syntax": "java", + "response_syntax": "json" + }, + "csharp": { + "title": "C#", + "sdkName": "csharp", + "request": "seam.UserIdentities.GenerateInstantKey(userIdentityId: \"5c945ab5-c75e-4bcb-8e5f-9410061c401f\")", + "response": "{\n \"instant_key_id\": \"33fb0384-b2b3-445e-b780-3fad784e9baa\",\n \"instant_key_url\": \"https://ik.seam.co/EXAMPLE\",\n \"user_identity_id\": \"48500a8e-5e7e-4bde-b7e5-0be97cae5d7a\",\n \"client_session_id\": \"7cc9b16b-d139-45e2-8042-5cef6ee101ea\",\n \"workspace_id\": \"398d80b7-3f96-47c2-b85a-6f8ba21d07be\",\n \"created_at\": \"2024-01-09T05:45:33.068Z\",\n \"expires_at\": \"2024-02-09T05:45:33.068Z\"\n}", + "request_syntax": "csharp", + "response_syntax": "json" + }, + "curl": { + "title": "cURL", + "sdkName": "curl", + "request": "curl --include --request POST \"https://connect.getseam.com/user_identities/generate_instant_key\" \\\n --header \"Authorization: Bearer $SEAM_API_KEY\" \\\n --json @- < "33fb0384-b2b3-445e-b780-3fad784e9baa", + "instant_key_url" => "https://ik.seam.co/EXAMPLE", + "user_identity_id" => "48500a8e-5e7e-4bde-b7e5-0be97cae5d7a", + "client_session_id" => "7cc9b16b-d139-45e2-8042-5cef6ee101ea", + "workspace_id" => "398d80b7-3f96-47c2-b85a-6f8ba21d07be", + "created_at" => "2024-01-09T05:45:33.068Z", + "expires_at" => "2024-02-09T05:45:33.068Z", +} +``` +{% endtab %} + +{% tab title="PHP" %} + +Specify the user_identity_id to receive the instant key. + +#### Code + +```php +user_identities->generate_instant_key( + user_identity_id: "5c945ab5-c75e-4bcb-8e5f-9410061c401f" +); +``` + +#### Output + +```php + "33fb0384-b2b3-445e-b780-3fad784e9baa", + "instant_key_url" => "https://ik.seam.co/EXAMPLE", + "user_identity_id" => "48500a8e-5e7e-4bde-b7e5-0be97cae5d7a", + "client_session_id" => "7cc9b16b-d139-45e2-8042-5cef6ee101ea", + "workspace_id" => "398d80b7-3f96-47c2-b85a-6f8ba21d07be", + "created_at" => "2024-01-09T05:45:33.068Z", + "expires_at" => "2024-02-09T05:45:33.068Z", +]; +``` +{% endtab %} + +{% tab title="Go" %} + +Specify the user_identity_id to receive the instant key. + +#### Code + +```go +package main + +import api "github.com/seamapi/go" + +func main() { + client.UserIdentities.GenerateInstantKey( + context.Background(), + api.UserIdentitiesGenerateInstantKeyRequest{ + UserIdentityId: api.String("5c945ab5-c75e-4bcb-8e5f-9410061c401f"), + }, + ) +} +``` + +#### Output + +```go +api.InstantKey{InstantKeyId: "33fb0384-b2b3-445e-b780-3fad784e9baa", InstantKeyUrl: "https://ik.seam.co/EXAMPLE", UserIdentityId: "48500a8e-5e7e-4bde-b7e5-0be97cae5d7a", ClientSessionId: "7cc9b16b-d139-45e2-8042-5cef6ee101ea", WorkspaceId: "398d80b7-3f96-47c2-b85a-6f8ba21d07be", CreatedAt: "2024-01-09T05:45:33.068Z", ExpiresAt: "2024-02-09T05:45:33.068Z"} +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Specify the user_identity_id to receive the instant key. + +#### Code + +```seam_cli +seam user-identities generate-instant-key --user_identity_id "5c945ab5-c75e-4bcb-8e5f-9410061c401f" +``` + +#### Output + +```seam_cli +{ + "instant_key_id": "33fb0384-b2b3-445e-b780-3fad784e9baa", + "instant_key_url": "https://ik.seam.co/EXAMPLE", + "user_identity_id": "48500a8e-5e7e-4bde-b7e5-0be97cae5d7a", + "client_session_id": "7cc9b16b-d139-45e2-8042-5cef6ee101ea", + "workspace_id": "398d80b7-3f96-47c2-b85a-6f8ba21d07be", + "created_at": "2024-01-09T05:45:33.068Z", + "expires_at": "2024-02-09T05:45:33.068Z" +} +``` +{% endtab %} + +{% endtabs %} + +
Authentication Methods @@ -37,3 +235,8 @@ Maximum number of times the instant key can be used. Default: 1. [instant\_key](./) + +--- + +## Examples + From 62b9e367fe8a00a6c2f60d96b2b85057a372b374 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 12 Jun 2025 16:56:03 -0700 Subject: [PATCH 3/4] Add ticks around user_identity_id --- src/data/code-sample-definitions/user-identities.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/code-sample-definitions/user-identities.yaml b/src/data/code-sample-definitions/user-identities.yaml index 84330d009..c3f8d288e 100644 --- a/src/data/code-sample-definitions/user-identities.yaml +++ b/src/data/code-sample-definitions/user-identities.yaml @@ -268,7 +268,7 @@ body: null - title: Generate an Instant Key - description: Specify the user_identity_id to receive the instant key. + description: Specify the `user_identity_id` to receive the instant key. request: path: /user_identities/generate_instant_key parameters: From b29e4eef2da88eaf8c50d1f566feb961da4bcf16 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 12 Jun 2025 23:57:16 +0000 Subject: [PATCH 4/4] ci: Generate docs --- docs/api/_blueprint.json | 2 +- docs/api/user_identities/generate_instant_key.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/api/_blueprint.json b/docs/api/_blueprint.json index 2491db7b3..7b76629d3 100644 --- a/docs/api/_blueprint.json +++ b/docs/api/_blueprint.json @@ -31460,7 +31460,7 @@ "codeSamples": [ { "title": "Generate an Instant Key", - "description": "Specify the user_identity_id to receive the instant key.", + "description": "Specify the `user_identity_id` to receive the instant key.", "request": { "path": "/user_identities/generate_instant_key", "parameters": { diff --git a/docs/api/user_identities/generate_instant_key.md b/docs/api/user_identities/generate_instant_key.md index c241480cf..ad1ce4f8d 100644 --- a/docs/api/user_identities/generate_instant_key.md +++ b/docs/api/user_identities/generate_instant_key.md @@ -10,7 +10,7 @@ Generates a new [instant key](https://docs.seam.co/latest/capability-guides/mobi {% tabs %} {% tab title="JavaScript" %} -Specify the user_identity_id to receive the instant key. +Specify the `user_identity_id` to receive the instant key. #### Code @@ -37,7 +37,7 @@ await seam.userIdentities.generateInstantKey({ {% tab title="cURL" %} -Specify the user_identity_id to receive the instant key. +Specify the `user_identity_id` to receive the instant key. #### Code @@ -70,7 +70,7 @@ EOF {% tab title="Python" %} -Specify the user_identity_id to receive the instant key. +Specify the `user_identity_id` to receive the instant key. #### Code @@ -97,7 +97,7 @@ InstantKey( {% tab title="Ruby" %} -Specify the user_identity_id to receive the instant key. +Specify the `user_identity_id` to receive the instant key. #### Code @@ -122,7 +122,7 @@ seam.user_identities.generate_instant_key(user_identity_id: "5c945ab5-c75e-4bcb- {% tab title="PHP" %} -Specify the user_identity_id to receive the instant key. +Specify the `user_identity_id` to receive the instant key. #### Code @@ -151,7 +151,7 @@ $seam->user_identities->generate_instant_key( {% tab title="Go" %} -Specify the user_identity_id to receive the instant key. +Specify the `user_identity_id` to receive the instant key. #### Code @@ -179,7 +179,7 @@ api.InstantKey{InstantKeyId: "33fb0384-b2b3-445e-b780-3fad784e9baa", InstantKeyU {% tab title="Seam CLI" %} -Specify the user_identity_id to receive the instant key. +Specify the `user_identity_id` to receive the instant key. #### Code