NaverProfile

class NaverProfile(val id: String, val nickname: String? = null, val name: String? = null, val email: String? = null, val gender: String? = null, val age: String? = null, val birthday: String? = null, val birthYear: String? = null, val profileImageUrl: String? = null, val mobile: String? = null)

A NAVER user's profile, as returned by NAVER's own profile API.

Every field except id can be absent — not because the network failed, but because the user declined to share it on the consent screen, or because your application was never approved for it. NAVER represents "not shared" as an empty string; this library represents it as null, so an absent value cannot be mistaken for a blank one.

Constructors

Link copied to clipboard
constructor(id: String, nickname: String? = null, name: String? = null, email: String? = null, gender: String? = null, age: String? = null, birthday: String? = null, birthYear: String? = null, profileImageUrl: String? = null, mobile: String? = null)

Properties

Link copied to clipboard
val age: String?

An age band, such as 20-29, never an exact age.

Link copied to clipboard

MM-DD. NAVER returns the day without the year here.

Link copied to clipboard

YYYY, granted separately from birthday.

Link copied to clipboard

The user's email address. Defaults to their primary NAVER address, but the user can pick a different one on the consent screen — so it is not proof of anything, and it can change between logins.

Link copied to clipboard

F, M, or U for unknown, exactly as NAVER sends it.

Link copied to clipboard
val id: String

NAVER's identifier for this user within your application. The same person gets a different id in a different application, and their actual NAVER ID is never disclosed. This is the value to key your accounts on.

Link copied to clipboard

The user's phone number, with hyphens. Requires additional approval from NAVER.

Link copied to clipboard
val name: String?

The user's name.

Link copied to clipboard

The user's nickname. NAVER substitutes an id*** form when none is set.

Link copied to clipboard

A URL to the user's profile picture.

Functions

Link copied to clipboard
open override fun toString(): String

Redacts everything a support ticket or a log file has no business carrying. id survives because it is the one value that identifies nobody outside your own application.