update()
Update user data if there is a logged in user.
- Javascript
- Go
- PHP
- API
const { user, error } = await kontenbase.auth.update({
firstName: 'Ega',
})
Response
Name | Type | Description |
---|---|---|
res.user | object | Response for data user |
res.status | number | Response for status code |
res.statusText | string | Response for status message |
res.error | object | Response for error occurred |
resp, err := client.Auth.Update(map[string]interface{}{
"FirstName": "Ega",
})
Response
Name | Type | Description |
---|---|---|
resp.User | map[string]interface{} | Response for data user |
resp.Status | int | Response for status code |
resp.StatusText | string | Response for status message |
$res = $kontenbase->auth->update([
'firstName' => 'Ega'
]);
Response
Name | Type | Description |
---|---|---|
$res['user'] | object | Response for data user |
$res['status'] | integer | Response for status code |
$res['statusText'] | string | Response for status message |
$res['error'] | object | Response for error occurred |
[PATCH]
https://api.kontenbase.com/query/api/v1/API_KEY/auth/user
note
- When using SDK you need to call
register()
orlogin()
first - When using API you need to set the Bearer
token
returned by register or login API in the header request