Updating boolean user properties

Hi, I need some help setting user properties. I can set text properties fine, but boolean properties are not working. If I set it to false in the website, then sen a value of 'false',it sets to false. In fact sending any string to the API sets it to false. If I send true, it doesnt get set to true and stays false. Regardless of what I set as the value, I get success from the API, even if i send a value of 'blue', which doesnt make much sense. Here is the code (I am using axios for the calls) export const setUserRegistered = async (params) => { const { request, kuid } = params const prop = 'is_registered' // 'is_registered' const value = true const apiUrl = /api/v1/users/${kuid}/properties/${prop}?value=${value} const headers = { 'Content-Type': 'application/json', Audience: 'https://mierabella-dev.au.kinde.com/api', Accept: 'application/json', Authorization: Bearer ${request.kindeAccessToken}, } const result = await request.kindeClient .put(apiUrl, {}, headers) .then((data) => { console.log('done', data.data) }) .catch((err) => { console.log('failed', kuid, err.response.data) }) } and here is the data returned { code: 'PROPERTY_VALUE_UPDATED', message: 'Property value updated' }
4 Replies
IkiTg07
IkiTg072mo ago
This is weird. Can you show the property config please ?
disquietone
disquietoneOP2mo ago
Sure.
No description
No description
IkiTg07
IkiTg072mo ago
Yeah this is not okay. I'll try in my end and get back to you asap Yeah i've the same issue. This is likely a bug i'll tell the team about The issue is whatever the string passed even "false" it will always update the property to a false bool
Oli - Kinde
Oli - Kinde2mo ago
Hey @disquietone, Thanks for reaching out. I have passed on this issue to my API and property expert teammates. I will get back to you once I have more information.
Want results from more Discord servers?
Add your server