How to Convert Blogger Username to Numeric ID

When working with the Blogger API, the user ID must be numeric. I found out my digital ID by looking at the URL of my Blogger profile page. However, I want my users to be able to use their regular Blogger username. So:

  • Is there a way to convert Blogger usernames to digital user identifiers?
  • Is there a way to pass usernames instead of Blogger API identifiers?

Thanks!

+4
source share
1 answer

It depends on what you are trying to do, but in most cases you do not need to know this information explicitly because authToken will take care of fixing these issues for you if you use the default URLs using the API. But in the interest of providing an answer in case you really need to know this:

  • After authenticating the user, simply request some information, such as a list of blogs, and you will be able to extract the identification number from your choice from several places in the response.
  • Not really, except that you use a username during login. Otherwise, you need to use either the default, assuming active authToken , or an ID to link to specific Blogger user content.
0
source

Source: https://habr.com/ru/post/1338056/


All Articles