With the Users Search endpoint, you can get all of your pending users by adding a Status: "pending" filter. This can replace any and all existing calls to the Get Pending Users endpoint.
The Search method also supports more filters to further constrain results. This library also provides a SearchAll convenience helper for iterating through all the results of a search.
We'd like to remove the GetPending method from this library to limit our maintenance work and remove some complexity for customers.
This marks the GetPending method as deprecated. It will be removed in the next major version of stytch-go.
Migration Guide
This migrates from GetPending to SearchAll, which has a cleaner iteration pattern:
Before
ctx := context.TODO()
params := &b2c.UsersGetPendingParams{
Limit: 200,
}
res, err := client.Users.GetPending(ctx, params)
if err != nil {
panic(err)
}
// TODO: Do something with res.Users
for res.HasMore {
params.StartingAfterID = res.StartingAfterID
res, err = client.Users.GetPending(ctx, params)
if err != nil {
panic(err)
}
// TODO: Do something with res.Users
}
With the Users Search endpoint, you can get all of your pending users by adding a
Status: "pending"
filter. This can replace any and all existing calls to the Get Pending Users endpoint.The Search method also supports more filters to further constrain results. This library also provides a SearchAll convenience helper for iterating through all the results of a search.
We'd like to remove the GetPending method from this library to limit our maintenance work and remove some complexity for customers.
This marks the GetPending method as deprecated. It will be removed in the next major version of stytch-go.
Migration Guide
This migrates from GetPending to SearchAll, which has a cleaner iteration pattern:
Before
After
If you prefer to keep the same iteration pattern that GetPending has, use Search directly instead: