[grid] add SMS OTP auth API#617
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
✱ Stainless preview builds for gridThis PR will update the cli csharp go kotlin openapi php python ruby typescript Edit this comment to update them. They will appear in their respective SDK's changelogs.
|
✅ grid-ruby studio · code · diff
Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅→build ✅→lint ✅→test ✅
✅ grid-go studio · code · diff
Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅→build ✅→lint ❗→test ❗go get github.com/stainless-sdks/grid-go@e3c0e0d8dacdce0464133da3dab6bd57830f4967New diagnostics (2 note)
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member. 💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
✅ grid-typescript studio · code · diff
Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅→build ✅→lint ✅→test ✅npm install https://pkg.stainless.com/s/grid-typescript/2c8ac0cd6a926b16405841d52a5e29b00d57a5f8/dist.tar.gz
⚠️ grid-kotlin studio · code · diff
Your SDK build had at least one "warning" diagnostic, which is a regression from the base state.
generate ⚠️(prev:generate ✅) →build ✅→lint ✅→test ❗(prev:test ✅)New diagnostics (1 warning, 2 note)
⚠️ Parameter/DuplicateNames: Duplicate parameters were renamed: `type`💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member. 💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
✅ grid-python studio · code · diff
Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅→build ✅→lint ❗→test ❗pip install https://pkg.stainless.com/s/grid-python/99198089c7b704b43877cff8ec4d088167134950/grid-0.0.1-py3-none-any.whl
✅ grid-csharp studio · code · diff
Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ⚠️→build ❗→lint ✅→test ❗New diagnostics (3 note)
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member. 💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member. 💡 Name/Renamed: 262 names were renamed due to language constraints, so fallback names will be used instead.
✅ grid-php studio · code · diff
Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅→lint ✅→test ✅New diagnostics (2 note)
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member. 💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.
✅ grid-cli studio · code · diff
Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️→build ❗→lint ❗→test ❗
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-06-26 00:10:59 UTC
f5862f7 to
ed1398a
Compare
|
ed1398a to
0119e58
Compare
|
this comment is expected and shouldnt matter because nobody is using this stuff yet |

Overview
SMS_OTPas a first-class auth method discriminator.400 Error400with codeSMS_OTP_CREDENTIAL_ALREADY_EXISTS.openapi/.Endpoint Shape After This Change
No endpoint path or header changes. This adds
SMS_OTPas another discriminator branch in the existing Embedded Wallet Auth credential flows.POST /auth/credentialsnow accepts an SMS OTP create request:{ "type": "SMS_OTP", "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002" }The unsigned add-credential request still returns
202 AuthSignedRequestChallenge:{ "type": "SMS_OTP", "payloadToSign": "...", "requestId": "Request:7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21", "expiresAt": "2026-04-08T15:35:00Z" }The signed retry returns
201 AuthMethodResponse:{ "id": "AuthMethod:019542f5-b3e7-1d02-0000-000000000001", "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002", "type": "SMS_OTP", "nickname": "+14155550123", "otpEncryptionTargetBundle": "{...}", "createdAt": "2026-04-08T15:30:01Z", "updatedAt": "2026-04-08T15:30:01Z" }If the target wallet already has an SMS OTP credential,
POST /auth/credentialsreturns400 Error400:{ "status": 400, "code": "SMS_OTP_CREDENTIAL_ALREADY_EXISTS", "message": "This wallet already has an SMS_OTP credential. Delete the existing one via DELETE /auth/credentials/{id} before adding a new phone number." }POST /auth/credentials/{id}/challengetreats SMS OTP like email OTP: the request body can be empty, and the response is200 AuthMethodResponsewithtype: "SMS_OTP"plus a freshotpEncryptionTargetBundle.{}POST /auth/credentials/{id}/verifynow accepts an SMS OTP verify request:{ "type": "SMS_OTP", "encryptedOtpBundle": "{\"encappedPublic\":\"...\",\"ciphertext\":\"...\"}" }The first verify leg returns
202 AuthSignedRequestChallenge; the signed retry sends the same body withGrid-Wallet-SignatureandRequest-Id, then returns200 AuthSession. SMS OTP sessions omitencryptedSessionSigningKeybecause the client keeps the TEK private key.{ "id": "Session:019542f5-b3e7-1d02-0000-000000000003", "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002", "type": "SMS_OTP", "nickname": "+14155550123", "expiresAt": "2026-04-08T16:30:01Z" }Downstream
grid-apiclient/spec output.Test Plan
make buildmake lint(passes; existing warning output remains)