Onesignal user id return -1

helo koders, i am trying to get onesignal id. i alreary read lot’s of topic & I tried to solved it, but can’t. i tried @dora_paz solution also but same result -1
Screenshot 2021-08-29 111019

Or you can try with curl method to obtain user id via CSV list

https://documentation.onesignal.com/reference/csv-export

sorry to say that i didn’t find the exact curl to find user id, can you share this here? please
is this?

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Authorization: Basic USER_AUTH_KEY" \
     --data-binary "{\"name\" : \"Your app 1\",
\"apns_env\": \"production\",
\"apns_p12\": \"asdsadcvawe223cwef...\",
\"apns_p12_password\": \"FooBar\",
\"organization_id\": \"your_organization_id\",
\"gcm_key\": \"a gcm push key\"}" \
     https://onesignal.com/api/v1/apps

I have also tried, when app is open first time it is returning -1, opening the app for 2nd time is returning the id correctly,I have tested this on android 8 and 11

do you find any other solution?

please share an demo curl example to find user id.

No…Thinking to use firebase notification extension to solve this issue, I don’t know when kodular will fix this issue.

1 Like

It take some time to make a user id. You can use clock to get it first time

kindly see the blocks he is using clock to get the userid

Kindly use this app to check it
Roundsheet.apk (6.8 MB)

Blocks

I don’t have any idea about it :slightly_smiling_face:

Doesn’t working. Only showing loading

Same Loading.

Oops sorry there is a wrong block. Wait a sec

1 Like

It Will Work Properly In Exported App
It Will Show Like That In Companion

Video

Blocks

Roundsheet.apk (6.8 MB)
Roundsheet.aia (2.8 KB)

1 Like

Who said that? Do you check or not?

He is right. Its not work on companion

1 Like

That app was working. Let me implenet in my project & i will informed you

1 Like

Yeah, now it is working and showing user id…

1 Like