now.gg 계정 서비스 관련 API 레퍼런스입니다.
토큰 인증 API의 세부 사항입니다.
https://now.gg
해당 API는 생성된 토큰을 인증하는 데 사용됩니다.
POST
/accounts/oauth2/v1/verify-token
Content-Type: application/json
다음 매개변수들을 Verify API의 요청 본문에 사용해야 합니다:
{
token_type: <token_type>,
token: <token>,
client_id: <client_id>,
client_secret: <client_secret>
}
| 이름 | 형 | 필요 | 허용 값 | 설명 |
|---|---|---|---|---|
| token_type | string | True | id_token, token | 요청된 토큰 유형 |
| token | string | True | id_token, token | 유효한 id_token 또는 now.gg에서 생성된 토큰 |
| client_id | string | True | Oauth client_id | now.gg 계정 관리자를 통해 생성된 고유 client_id |
| client_secret | string | 토큰 형이 토큰인 경우 True, 토큰 형이 id_token인 경우 False |
Oauth client_secret | now.gg 계정 관리자를 통해 생성된 고유한 client_secret |
client_id 및 client_secret)은 이 섹션을 통해 요청할 수 있습니다.id_token은 기본 로그인 흐름에 사용됩니다.token은 고급 로그인 통합 흐름에 사용됩니다.{
"success": true,
"code": "VERIFICATION_SUCCESS",
"decodedData": {},
"msg": "Token Verification success"
}
{
"success": false,
"code": "EXPIRED_TOKEN",
"msg": "Token Expired!"
}
{
"success": false,
"code": "INVALID_TOKEN",
"msg": "Token Invalid for given ClientId/ClientSecret"
}
| 이름 | 형 | 허용 값 | 설명 |
|---|---|---|---|
| success | boolean | True, False | 결과를 True 또는 False로 반환합니다. |
| code | string | VERIFICATION_SUCCESS INVALID_TOKEN EXPIRED_TOKEN |
VERIFICATION_SUCCESS: client_id/client_secret 토큰 인증 성공 INVALID_TOKEN: client_id 토큰 형식이 잘못되었거나 ‘aud’가 client_id와 일치하지 않음 EXPIRED_TOKEN: 토큰 만료 |
| msg | string | Token Verification Success Token Expired Token Invalid for given ClientId/ClientSecret |
성공/실패를 설명하는 유저 친화적인 메시지 – 반환된 코드와 연결됨 |
| decodedData | dict/obj | 성공 후 반환된 디코딩된 데이터 |
{
"iss": 'https://now.gg', // id_token 발행자
"sub": <>, <sub>,
"aud": client_id,// 토큰이 생성된 앱의 id
"exp": <>,// 토큰이 만료되는 시간
"iat": <>, // 토큰 발행 에포크 타임스탬프
"auth_time": <>, // 인증이 완료된 시간
"email": <>, // 유저 이메일
"mobile": <> // 국가 코드 접두어가 있는 유저 모바일
"userId": <> // 고유 유저 식별자
"name": <>, // 유저 이름
"picture": <>, // 프로필 이미지 URL
"countryCode":<>, // 유저 국가 코드
}
{
"iss": "https://now.gg", // 토큰 발행자
"tokenId": "token_id", // token_id
"aud": "client_id", // client_id
"sessionId": "sessionId", // session Id
"userId": "userId" , // user Id
"scope": "email", // 인증 범위: email/profile/authorization
"iat": 1636779002,
"exp": 1636782602
}
| 이름 | 형 | 허용 | 설명 |
|---|---|---|---|
| Iss | string | id_token, token | 토큰 발행자 |
| sub | string | id_token | uuid/ulid를 반영하는 임의의 고유 문자열 |
| aud | string | id_token, token | 토큰이 생성되는 고유한 client_id |
| picture | string | id_token | 프로필 이미지 URL |
| exp | int | id_token, token | 토큰이 만료되는 시간 |
| iat | int | id_token, token | 토큰 발행 에포크 타임스탬프 |
| auth_time | int | id_token | 인증이 완료된 시간 |
| string | id_token | 계정과 연결된 유저의 이메일 주소 | |
| mobile | string | id_token | 접두어(국가명)가 추가된 유저의 휴대폰 번호 |
| userId | string | id_token, token | 고유 유저 식별자 |
| name | string | id_token | 유저 이름 |
| countryCode | string | id_token | 유저 국가 코드 |
| tokenId | string | token | 반환된 토큰의 tokenId |
| sessionId | string | token | 인증 세션 ID |
| scope | string | token | 인증 범위: 이메일/프로필/인증 |
토큰 생성 API의 세부 사항입니다.
https://now.gg
인증 코드를 사용하여 token 및 refresh_token을 생성하는 데 사용되는 API입니다.
POST
/accounts/oauth2/v1/token
Content-Type: application/json
token 및 refresh_token을 생성하려면 토큰 생성 API와 함께 다음 요청 바디를 사용해야 합니다.
중요: refresh_token을 사용하여 토큰을 생성하는 경우 여기를 확인해 주세요.
{
client_secret: '<your_oauth_client_secret>',
client_id: '<your_oauth_client_id>',
grant_type: 'code',
code: '<authorization_code received via account manager>',
token_type: '<refresh_token token>',
}
| 이름 | 형 | 필요 | 허용 값 | 설명 |
|---|---|---|---|---|
| token_type | string | true | refresh_token, token | 요청된 토큰 유형 |
| grant_type | string | true | code | 코드 유형 |
| code | string | true | Auth Code | 계정 관리자를 통해 받은 authorization_code |
| client_id | string | true | OAuth client_id | 고유 OAuth client_id |
| client_secret | string | true | OAuth client_secret | 고유 OAuth client_secret |
참고: OAuth 자격 증명 (client_id와 client_secret)은 이 섹션을 통해 요청할 수 있습니다.
{
"success": true,
"code": "REFRESH_TOKEN TOKEN",
"token": "<token>", // Authorization Header에 사용될 토큰입니다.
"refresh_token": "<refresh_token>", // 토큰이 만료되면 새 토큰을 생성하는데 사용됩니다.
"token_expiry": "<token_expiry_time>", // 토큰 만료 시간
"refresh_token_expiry": "<refresh_token_expiry>" // refresh_token 만료 시간
}
| 이름 | 형 | 설명 |
|---|---|---|
| success | boolean | true – 성공 false – 실패 |
| code | string | REFRESH_TOKEN TOKEN |
| token | string | Authorization 헤더에 사용되는 토큰 |
| refresh_token | string | 토큰이 만료되면 새 토큰을 생성하는 데 사용 |
| token_expiry | string | 반환된 토큰 만료 시간 |
| refresh_token_expiry | string | 반환된 refresh_token 만료 시간 |
token이 만료된 경우 refresh_token을 사용하여 토큰을 생성할 수 있습니다.
{
client_secret: '<your_oauth_client_secret>',
client_id: '<your_oauth_client_id>',
grant_type: 'refresh_token',
refresh_token: '<refresh_token>',
token_type: '<token>',
}
| 이름 | 형 | 필요 | 허용 값 | 설명 |
|---|---|---|---|---|
| token_type | string | true | token | 요청된 토큰 유형 |
| grant_type | string | true | refresh_token | refresh_token 유형 |
| refresh_token | string | true | refresh_token | 이전에 생성한 Refresh_token |
| client_id | string | true | OAuth client_id | 고유 OAuth client_id |
| client_secret | string | true | OAuth client_secret | 고유 OAuth client_secret |
{
"success": true,
"code": "<REFRESH_TOKEN TOKEN>",
"token": "<token>", // Authorization Header에 사용될 토큰입니다.
"token_expiry": "<token_expiry>", // 토큰 만료 시간
}
| 이름 | 형 | 설명 |
|---|---|---|
| success | boolean | True – 성공 False – 실패 |
| code | string | REFRESH_TOKEN TOKEN |
| token | string | Authorization 헤더에 사용되는 토큰 |
| token_expiry | string | 반환된 토큰 만료 시간 |
유저 정보 API 세부 사항입니다.
https://now.gg
해당 API는 유저 정보를 가져오는 데 사용됩니다.
GET
/accounts/users/v1/userinfo
헤더 내에 인증을 위해 Bearer Token을 포함해야 합니다.
{ Authorization: 'Bearer Token'}
User Info API를 사용하여 유저 데이터를 가져올 시 다음 예상 응답이 반환됩니다.
{
success: true,
code: 'USERDATA',
userData: {
email: '', // 유저 이메일 주소
mobile: '', // 유저 휴대폰 번호
userId: '', // 유저 userId
profilePicture: '', // 프로필 이미지 URL
name: '', // 유저 이름
countryCode: 'IN', // 유저 국가 코드
country: '', // 유저 국가
countryRegionCode: '', // 유저 국가 지역 코드
countryRegion: '', // 유저 국가 지역
city: '', // 유저 도시
postalCode: '', // 유저 우편번호
},
}
| 이름 | 형 | 설명 |
|---|---|---|
| success | boolean | True – 성공 False – 실패 |
| string | 유저 이메일 주소 | |
| mobile | string | CountryCode가 접두어로 추가된 유저의 휴대폰 번호 |
| userId | string | 유저 계정의 고유 식별자 |
| profilePicture | string | 유저 프로필 이미지의 URL |
| name | string | 유저 이름 |
| countryCode | string | 유저 국가 코드 |
| country | string | 유저 국가 |
| countryRegionCode | string | 유저 국가 지역 코드 |
| countryRegion | string | 유저 국가 지역 |
| city | string | 유저 도시 |
| postalCode | string | 유저 우편번호 |
| code | string | USERDATA – 유저 정보 |
세션 정보 API의 세부 사항입니다.
https://now.gg
해당 API는 유저의 세션 정보를 가져오는 데 사용됩니다.
GET
/accounts/users/v1/sessioninfo
헤더 내에 인증을 위해 Bearer Token을 포함해야 합니다.
{ Authorization: 'Bearer Token'}
Session Info API를 사용하여 세션 데이터를 가져올 시 다음 예상 응답이 반환됩니다.
{
success: true,
code: 'USERDATA',
sessionData: {
userAgent: '', // 유저 에이전트 정보
ip: '', // 유저 ip
locale: 'en-GB', // 유저 locale
deviceData: {
os: {
version: '', // OS 버전
name: '', // OS 이름
platform: '', // OS 플랫폼
},
device: {
brand: '', // 기기 브랜드 정보
model: '', // 기기 모델 정보
type: 'desktop', // 기기 유형
},
client: {
version: '', // 클라이언트 버전
engine: '', // 클라이언트 엔진
name: '', // 클라이언트 이름
type: '', // 클라이언트 유형
engineVersion: '', // 클라이언트 엔진 버전
},
},
geoData: {
countryCode: '', // 유저 국가 코드
country: '', // 유저 국가
countryRegionCode: '', // 유저 국가 지역 코드
countryRegion: '', // 유저 국가 지역
city: '', // 유저 도시
postalCode: '', // 유저 우편번호
},
lastSessionTimestamp: '', // 세션 타임스탬프
packageName: '', // 패키지 이름
},
}
| 이름 | 형 | 설명 |
|---|---|---|
| success | boolean | True – 성공 False – 실패 |
| code | string | USERDATA – 세션 정보 |
| lastSessionTimestamp | string | 마지막 세션 타임스탬프 |
| packageName | string | 패키지 이름 |
| 이름 | 형 | 설명 |
|---|---|---|
| userAgent | string | User-Agent 정보 |
| ip | string | 유저 IP |
| locale | string | 유저 Locale |
| 이름 | 형 | 설명 |
|---|---|---|
| OS | ||
| version | string | 유저 운영 체제의 버전 |
| name | string | 유저 운영 체제의 이름 |
| platform | string | 유저 운영 체제의 플랫폼 |
| Device | ||
| brand | int | 유저 기기의 브랜드 |
| model | int | 유저 기기의 모델 |
| type | string | 기기 유형 |
| Client | ||
| version | string | 클라이언트 버전 |
| engine | string | 클라이언트 엔진 |
| name | string | 클라이언트 이름 |
| type | string | 클라이언트 유형 |
| engineVersion | string | 클라이언트 엔진 버전 |
| 이름 | 형 | 설명 |
|---|---|---|
| countryCode | string | 유저 국가 코드 |
| country | string | 유저 국가 |
| countryRegionCode | string | 유저 국가 지역 코드 |
| countryRegion | string | 유저 국가 지역 |
| city | string | 유저 도시 |
| postalCode | string | 유저 우편번호 |
유저 계정 서비스
유저 계정 서비스
문서 Rev. 1.0