After changing my old PHPBB2 to vBulletin Connect 5.1 i have many 401 errors...

For topics:
For posts:
For forums:

I've found in the posts,forums and threads tables columns "importforumid" etc..

Could you give me information where can i generate proper url for new posts and threads having new posts and threads ID's?

For example I have my old thread ID, in the trheads table i can get the new ID, and then i should have slug to this new thread.

I need functions getThreadSlugFromId() and getPostSlugFromId()