fix: Kinde Management API section refresh#728
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughConsolidates and rebrands multiple MDX docs to the "Kinde Management API": updates front-matter/sidebars, expands scope reference with grouped tables, streamlines token acquisition flows, adds a Postman guide and JS SDK page, and removes/merges older example/test-token pages. ChangesManagement API docs rebranding & consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying kinde-docs-preview with
|
| Latest commit: |
8da5a4e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8a0a0cbd.kinde-docs-preview.pages.dev |
| Branch Preview URL: | https://tamal-update-management-api.kinde-docs-preview.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx`:
- Line 56: Replace the misspelled word "prefered" with "preferred" in the
user-facing instruction sentence that reads "Make a POST request to the
`https://<your_subdomain>.kinde.com/oauth2/token` endpoint using your prefered
programming language below:" in
src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx so the
sentence reads "using your preferred programming language below".
In `@src/content/docs/developer-tools/kinde-api/call-the-api-postman.mdx`:
- Line 107: The image tag currently has an empty alt attribute (alt=""); replace
it with a concise, descriptive alt text that conveys the instructional content
of the screenshot (e.g., "Postman Authorization tab showing token request
configuration: client credentials, token URL, and scope"), so screen readers
understand this step; locate the image occurrence with alt="" in
call-the-api-postman.mdx and update that alt string to the descriptive text.
In `@src/content/docs/developer-tools/kinde-api/connect-to-kinde-api.mdx`:
- Around line 52-55: The ordered-step numbering in the quickstart list is
non-sequential (the steps jump between numbers), so update the ordered list in
the "connect-to-kinde-api.mdx" quickstart section to use consecutive numbering
(e.g., 1., 2., 3., 4.) or switch to a single markdown ordered list that lets the
renderer auto-number; ensure the block containing "Go to your Kinde
dashboard..." and the subsequent "Give the application a name..." and "Select
Save" lines are renumbered to be consecutive and also check the later step
referenced around the same section (the step at 74) so all related ordered steps
flow sequentially.
- Line 40: Fix the wording in the lead sentence that currently reads "The Kinde
Management API let's you do everything you can do with the Kinde UI. It is
useful for pragmatically managing your Kinde account and resources such as use
in CI/CD pipelines." — change "let's" to the correct possessive/verb form "lets"
and replace "pragmatically" with "programmatically", and rephrase the tail for
clarity (e.g., "...programmatically managing your Kinde account and resources,
such as in CI/CD pipelines.") so the opening paragraph reads clearly and uses
correct terminology.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5c37d836-75ab-4cea-afd7-7c4b5d41ce9a
📒 Files selected for processing (9)
src/content/docs/developer-tools/kinde-api/about-m2m-scopes.mdxsrc/content/docs/developer-tools/kinde-api/access-token-for-api.mdxsrc/content/docs/developer-tools/kinde-api/api-example-node.mdxsrc/content/docs/developer-tools/kinde-api/api-rate-limits.mdxsrc/content/docs/developer-tools/kinde-api/call-the-api-postman.mdxsrc/content/docs/developer-tools/kinde-api/connect-to-kinde-api.mdxsrc/content/docs/developer-tools/kinde-api/kinde-api-test-token.mdxsrc/content/docs/developer-tools/kinde-api/search-users-via-api.mdxsrc/content/docs/developer-tools/kinde-api/troubleshoot-kinde-api.mdx
💤 Files with no reviewable changes (2)
- src/content/docs/developer-tools/kinde-api/api-example-node.mdx
- src/content/docs/developer-tools/kinde-api/kinde-api-test-token.mdx
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/content/docs/developer-tools/kinde-api/about-m2m-scopes.mdx`:
- Line 60: Split the combined example into two distinct entries so each scope
has its own description: change the single line containing `read:roles` or
`update:roles` — manage roles into two bullets or lines — one for `read:roles`
with a concise read-only description (e.g., "view or list roles, read role
details") and one for `update:roles` with a concise write description (e.g.,
"create, update or delete roles / manage role assignments"); update the
surrounding list formatting to match existing bullets so each scope is clearly
separate and unambiguous.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f660ce9b-0eb4-4148-b0c8-f9c4a4267670
📒 Files selected for processing (2)
src/content/docs/developer-tools/kinde-api/about-m2m-scopes.mdxsrc/data/sidebarData.ts
✅ Files skipped from review due to trivial changes (1)
- src/data/sidebarData.ts
…on errors and troubleshooting
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/content/docs/developer-tools/kinde-api/call-the-api-postman.mdx`:
- Around line 130-131: Update the POST request URL in the create-user step so it
uses the full domain variable instead of a relative path: replace "/api/v1/user"
with the full URL using the KINDE_DOMAIN variable (e.g.,
"{{KINDE_DOMAIN}}/api/v1/user") in the text that describes creating the request;
ensure the same variable format is used as in the earlier reference to
KINDE_DOMAIN to keep consistency with the instructions and Postman examples.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ebbbfc7d-a6ca-4953-8746-b5381d83adc5
📒 Files selected for processing (1)
src/content/docs/developer-tools/kinde-api/call-the-api-postman.mdx
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx (5)
109-135:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winGo examples have unclosed string literals and use a deprecated package.
All four import paths (lines 110–113 and 400–402) and both
urlvariable declarations (lines 118, 407) are missing their closing", making every Go snippet a compile error.Additionally,
ioutil.ReadAllhas been deprecated since Go 1.16; the replacement isio.ReadAll(import"io"instead of"io/ioutil").🐛 Proposed fix (token example — apply the same pattern to the API-call tab)
import ( - "fmt - "strings - "net/http - "io/ioutil + "fmt" + "strings" + "net/http" + "io" ) func main() { - url := "https://<your_subdomain>.kinde.com/oauth2/token + url := "https://<your_subdomain>.kinde.com/oauth2/token" ... - body, _ := ioutil.ReadAll(res.Body) + body, _ := io.ReadAll(res.Body)Also applies to: 399-423
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx` around lines 109 - 135, The Go snippets have unclosed string literals in the import block and the url variable and use the deprecated ioutil.ReadAll; fix by closing all missing double quotes in the import list and in the url assignments (the variable named url), replace import "io/ioutil" with import "io" and update ioutil.ReadAll(...) to io.ReadAll(...), and ensure the imports are a valid Go import block and the POST request creation (http.NewRequest) and response handling (defer res.Body.Close()) remain unchanged.
309-312:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winSwift examples:
httpMethodassignment is missing its closing".
request.httpMethod = "POST(line 310) andrequest.httpMethod = "GET(line 587) are both unterminated string literals, making each Swift snippet a compile error.🐛 Proposed fix
-request.httpMethod = "POST +request.httpMethod = "POST"-request.httpMethod = "GET +request.httpMethod = "GET"Also applies to: 585-589
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx` around lines 309 - 312, The Swift snippets assign request.httpMethod using unterminated string literals (e.g., request.httpMethod = "POST and request.httpMethod = "GET) causing compile errors; fix by adding the missing closing quote on the httpMethod assignments so they read request.httpMethod = "POST" and request.httpMethod = "GET" in the examples (look for occurrences of request.httpMethod in the affected code blocks and update both instances).
254-268:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winPython examples are non-functional: empty hostname, wrong URL format in
conn.request(), and an unclosed string.Three distinct bugs affect both Python tabs:
Empty hostname (lines 256, 534):
HTTPSConnectionshould be instantiated by passing it a host —HTTPSConnection("")provides no host and will fail with a socket error.Full URL passed as path (lines 262, 541):
HTTPConnection.request()takes the request URIurl, and the provided URL must be an absolute path to conform with RFC 2616 §5.1.2 (e.g./oauth2/token, nothttps://...). Passing a full URL constructs a malformed HTTP request line.Unclosed string literal (line 258): the
payloadstring is missing its closing"→SyntaxError.🐛 Proposed fix (token example — apply same pattern to the API-call tab)
-conn = http.client.HTTPSConnection("") +conn = http.client.HTTPSConnection("<your_subdomain>.kinde.com") -payload = "grant_type=client_credentials&client_id=<your_m2m_client_id>&client_secret=<your_m2m_client_secret>&audience=https%3A%2F%2F<your_subdomain>.kinde.com%2Fapi +payload = "grant_type=client_credentials&client_id=<your_m2m_client_id>&client_secret=<your_m2m_client_secret>&audience=https%3A%2F%2F<your_subdomain>.kinde.com%2Fapi" headers = { 'content-type': "application/x-www-form-urlencoded" } -conn.request("POST", "https://<your_subdomain>.kinde.com/oauth2/token", payload, headers) +conn.request("POST", "/oauth2/token", payload, headers)For the GET tab (line 534, 541):
-conn = http.client.HTTPSConnection("") +conn = http.client.HTTPSConnection("<your_subdomain>.kinde.com") -conn.request("GET", "https://<your_subdomain>.kinde.com/api/v1/users", headers=headers) +conn.request("GET", "/api/v1/users", headers=headers)Also applies to: 531-547
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx` around lines 254 - 268, The Python example is non-functional: fix the empty host in HTTPSConnection (replace HTTPSConnection("") with HTTPSConnection("<your_subdomain>.kinde.com")), close the missing quote on the payload string (ensure payload = "grant_type=...&audience=..."), and pass a path to conn.request rather than a full URL (use conn.request("POST", "/oauth2/token", payload, headers)); apply the same corrections in the API-call GET tab as well where conn.request and HTTPSConnection are used.
232-234:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winPHP examples: missing closing
"inCURLOPT_HTTPHEADERarray causes a parse error.Line 233 (
"content-type: application/x-www-form-urlencoded) and line 511 ("content-type: application/json) are both missing their closing double-quote, making each PHP snippet a fatal parse error.🐛 Proposed fix
- "content-type: application/x-www-form-urlencoded + "content-type: application/x-www-form-urlencoded"- "content-type: application/json + "content-type: application/json"Also applies to: 509-512
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx` around lines 232 - 234, The PHP snippets have unterminated header strings causing parse errors: fix the CURLOPT_HTTPHEADER arrays by adding the missing closing double-quote to the header entries (the strings starting with "content-type: application/x-www-form-urlencoded and "content-type: application/json) so each header item in the CURLOPT_HTTPHEADER array is a properly quoted string; update both occurrences that use CURLOPT_HTTPHEADER to close the quotes.
282-291:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRuby examples:
VERIFY_NONEdisables TLS verification (security risk) and the POST body string is unclosed.
OpenSSL::SSL::VERIFY_NONEon lines 283 and 562 turns off certificate validation entirely. Documentation examples that include this setting teach readers to ship insecure code; the line should be removed (Ruby'sNet::HTTPusesVERIFY_PEERby default whenuse_ssl = true).Line 287 also has a missing closing
"onrequest.body = "...", causing a runtimeSyntaxError.🐛 Proposed fix (apply to both Ruby tabs)
http = Net::HTTP.new(url.host, url.port) http.use_ssl = true -http.verify_mode = OpenSSL::SSL::VERIFY_NONE-request.body = "grant_type=client_credentials&client_id=<your_m2m_client_id>&client_secret=<your_m2m_client_secret>&audience=https%3A%2F%2F<your_subdomain>.kinde.com%2Fapi +request.body = "grant_type=client_credentials&client_id=<your_m2m_client_id>&client_secret=<your_m2m_client_secret>&audience=https%3A%2F%2F<your_subdomain>.kinde.com%2Fapi"Also applies to: 560-570
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx` around lines 282 - 291, The Ruby examples disable TLS verification and contain an unterminated string: remove the insecure assignment to OpenSSL::SSL::VERIFY_NONE (do not set http.verify_mode; let Net::HTTP use VERIFY_PEER by default) wherever it appears (reference OpenSSL::SSL::VERIFY_NONE and http.verify_mode in the Ruby blocks), and fix the POST body string by closing the quotation for request.body in the Net::HTTP::Post example (reference request.body and Net::HTTP::Post) so the string is valid and the code no longer raises a SyntaxError; apply the same two fixes to both Ruby code blocks mentioned.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx`:
- Around line 333-363: The two JWT examples are inconsistent: the raw token
response shows "scope": "" while the decoded JWT shows "scope": "create:users
read:users" and an empty "scp": []; update the examples to represent the same
scenario by populating the raw response "scope" with "create:users read:users"
and change the decoded JWT "scp" to ["create:users","read:users"] (or
alternatively add a brief clarifying sentence that the top block is a generic
empty-scope response and the decoded block is an example with granted scopes),
and ensure the fields "scope" and "scp" are consistent across the "access_token"
response and decoded JWT examples.
---
Outside diff comments:
In `@src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx`:
- Around line 109-135: The Go snippets have unclosed string literals in the
import block and the url variable and use the deprecated ioutil.ReadAll; fix by
closing all missing double quotes in the import list and in the url assignments
(the variable named url), replace import "io/ioutil" with import "io" and update
ioutil.ReadAll(...) to io.ReadAll(...), and ensure the imports are a valid Go
import block and the POST request creation (http.NewRequest) and response
handling (defer res.Body.Close()) remain unchanged.
- Around line 309-312: The Swift snippets assign request.httpMethod using
unterminated string literals (e.g., request.httpMethod = "POST and
request.httpMethod = "GET) causing compile errors; fix by adding the missing
closing quote on the httpMethod assignments so they read request.httpMethod =
"POST" and request.httpMethod = "GET" in the examples (look for occurrences of
request.httpMethod in the affected code blocks and update both instances).
- Around line 254-268: The Python example is non-functional: fix the empty host
in HTTPSConnection (replace HTTPSConnection("") with
HTTPSConnection("<your_subdomain>.kinde.com")), close the missing quote on the
payload string (ensure payload = "grant_type=...&audience=..."), and pass a path
to conn.request rather than a full URL (use conn.request("POST",
"/oauth2/token", payload, headers)); apply the same corrections in the API-call
GET tab as well where conn.request and HTTPSConnection are used.
- Around line 232-234: The PHP snippets have unterminated header strings causing
parse errors: fix the CURLOPT_HTTPHEADER arrays by adding the missing closing
double-quote to the header entries (the strings starting with "content-type:
application/x-www-form-urlencoded and "content-type: application/json) so each
header item in the CURLOPT_HTTPHEADER array is a properly quoted string; update
both occurrences that use CURLOPT_HTTPHEADER to close the quotes.
- Around line 282-291: The Ruby examples disable TLS verification and contain an
unterminated string: remove the insecure assignment to OpenSSL::SSL::VERIFY_NONE
(do not set http.verify_mode; let Net::HTTP use VERIFY_PEER by default) wherever
it appears (reference OpenSSL::SSL::VERIFY_NONE and http.verify_mode in the Ruby
blocks), and fix the POST body string by closing the quotation for request.body
in the Net::HTTP::Post example (reference request.body and Net::HTTP::Post) so
the string is valid and the code no longer raises a SyntaxError; apply the same
two fixes to both Ruby code blocks mentioned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2b776cb8-c90d-4649-9102-898a749920cf
📒 Files selected for processing (1)
src/content/docs/developer-tools/kinde-api/access-token-for-api.mdx
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/content/docs/developer-tools/kinde-api/search-users-via-api.mdx`:
- Line 117: Update the inconsistent property key in the API example: replace
kp_user_city with the correct kp_usr_ prefix to match the other examples (e.g.,
kp_usr_last_name, kp_usr_industry, kp_usr_middle_name and the kp_usr_utm_source
pattern) so the GET example reads GET
/api/v1/search/users?query=*&properties[kp_usr_city]=Sydney; ensure only the
property key is changed and the rest of the example stays intact.
- Line 170: The doc line describing the active_since parameter currently links
to a CDISC article about ISO 8601 interval notation which is irrelevant for
datetime strings; update the hyperlink target used in the active_since
description to a developer-appropriate reference (for example RFC 3339 or the
ISO 8601 spec) that documents datetime string formats (e.g., use
https://tools.ietf.org/html/rfc3339 or the ISO page) while keeping the visible
text "ISO 8601 formatted date/time string" so readers land on authoritative
datetime format guidance rather than interval/clinical content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 64ac3010-09de-45b0-81ec-26c707affb75
📒 Files selected for processing (2)
src/content/docs/developer-tools/kinde-api/management-api-js.mdxsrc/content/docs/developer-tools/kinde-api/search-users-via-api.mdx
✅ Files skipped from review due to trivial changes (1)
- src/content/docs/developer-tools/kinde-api/management-api-js.mdx
This PR does an overhaul of the Management API section. It organizes the docs and sections with logical flow and removes redundant pages.
Created the following pages:
Overhauled the following pages with better logical structure and extended examples:
Summary by CodeRabbit