function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ollie.ax81Ollie.ax81 

How do I get my own user 18 char ID?

I want to create a document through the API. I can create a folder and get the ID from the result, but I cannot leave the authorId out and I don't have the 18 char ID for myself to insert into the authorId field to create the document.

Seems to me that the authorId value should default to the user doing the create...but that's just the way I would do it.
zakzak
You should get your userId back in the login call.

Simon
Ollie.ax81Ollie.ax81
Yes thanks, I used loginResult.getUserId()