Toss Login
This is an API that issues Access Token and Refresh Token from an Authorization Code. The validity period of the issued Access Token is 1 hour.
Business error code
The errors below respond with HTTP 200 and resultType: FAIL.
4050
It is not a mini app registered with the authentication server.
4095
The request limit has been exceeded. Please try again later.
This API can pass through the error codes of the connected internal system as is. Treat undocumented errorCode as a failure and refer to the reason message.
Request limit: 3,000 per minute per app
This is client-certificate-based mTLS authentication issued to the partner. The mini app is identified by the certificate's CN. Refer to the Use the server API document for how to issue and manage certificates.
This is the request body for issuing an OAuth2 token.
This is the Authorization Code issued through the OAuth2 authentication process. This code is delivered as a query parameter in the redirect URL after user authentication is completed.
SplxlOBeZQQYbYS6WxSbIAThis is the acquisition channel through which the user entered the app. For example, it indicates which path was used to access this feature, such as a deep link, push notification, or in-app banner.
deeplinkThe request succeeded and the issued token information is returned.
The request body is not in the correct format. Check the field-by-field details in error.data.errorDetails.
This is an unclassified server error. If it keeps failing, please contact the partner support channel.
POST /api-partner/v1/apps-in-toss/user/oauth2/generate-token HTTP/1.1
Host: apps-in-toss-api.toss.im
Content-Type: application/json
{
"authorizationCode": "SplxlOBeZQQYbYS6WxSbIA",
"referrer": "deeplink"
}{
"resultType": "SUCCESS",
"success": {
"accessToken": "ya29.A0ARrdaM9bZxZJ...",
"expiresIn": 3600,
"refreshToken": "1//0gdfg23rF9sds...",
"scope": "profile message:send",
"tokenType": "Bearer"
}
}This is an API that retrieves information about the logged-in user using the Access Token.
Business error code
The errors below respond with HTTP 200 and resultType: FAIL.
4010
Authentication information cannot be found.
4095
The request limit has been exceeded. Please try again later.
This API can pass through the error codes of the connected internal system as is. Treat undocumented errorCode as a failure and refer to the reason message.
Request limit: 3,000 per minute per app
This is client-certificate-based mTLS authentication issued to the partner. The mini app is identified by the certificate's CN. Refer to the Use the server API document for how to issue and manage certificates.
This is the value of the Authorization header containing the Access Token in Bearer format. The Access Token is issued via the Get AccessToken API.
Bearer ya29.A0ARrdaM9bZxZJ...The request succeeded and the retrieved user profile information is returned in the response. Some items may be null depending on whether the user has consented.
There is no Authorization header. error.data is an empty object, and error.reason is returned as Unknown Error.
This is an unclassified server error. If it keeps failing, please contact the partner support channel.
GET /api-partner/v1/apps-in-toss/user/oauth2/login-me HTTP/1.1
Host: apps-in-toss-api.toss.im
Authorization: Bearer {accessToken}{
"resultType": "SUCCESS",
"success": {
"agreedTerms": [
"tos_terms_1",
"privacy_policy"
],
"birthday": "19900101",
"callingCode": "82",
"ci": "aaf7cb53...",
"di": "b712df83...",
"email": "user@example.com",
"gender": "M",
"name": "홍길동",
"nationality": "KR",
"phone": "1012345678",
"scope": "profile message:send",
"userKey": 123456789
}
}This is an API that reissues an Access Token using a Refresh Token. The validity period of the Refresh Token is 14 days.
Business error code
The errors below respond with HTTP 200 and resultType: FAIL.
4050
It is not a mini app registered with the authentication server.
4095
The request limit has been exceeded. Please try again later.
This API can pass through the error codes of the connected internal system as is. Treat undocumented errorCode as a failure and refer to the reason message.
Request limit: 3,000 per minute per app
This is client-certificate-based mTLS authentication issued to the partner. The mini app is identified by the certificate's CN. Refer to the Use the server API document for how to issue and manage certificates.
This is a request to reissue an access token using an existing refresh token.
This is the previously issued refresh token. You can request a new access token with this token.
1//0gdfg23rF9sds...The request succeeded and information related to the reissued Access Token is returned.
The request body is not in the correct format. Check the field-by-field details in error.data.errorDetails.
This is an unclassified server error. If it keeps failing, please contact the partner support channel.
POST /api-partner/v1/apps-in-toss/user/oauth2/refresh-token HTTP/1.1
Host: apps-in-toss-api.toss.im
Content-Type: application/json
{
"refreshToken": "1//0gdfg23rF9sds..."
}{
"resultType": "SUCCESS",
"success": {
"accessToken": "ya29.A0ARrdaM9bZxZJ...",
"expiresIn": 3600,
"refreshToken": "1//0gdfg23rF9sds...",
"scope": "profile message:send",
"tokenType": "Bearer"
}
}This is an API that disconnects the user's link using the Access Token in the Authorization header.
Business error code
The errors below respond with HTTP 200 and resultType: FAIL.
4050
It is not a mini app registered with the authentication server.
4010
Authentication information cannot be found.
4095
The request limit has been exceeded. Please try again later.
This API can pass through the error codes of the connected internal system as is. Treat undocumented errorCode as a failure and refer to the reason message.
Request limit: 3,000 per minute per app
This is client-certificate-based mTLS authentication issued to the partner. The mini app is identified by the certificate's CN. Refer to the Use the server API document for how to issue and manage certificates.
This is the value of the Authorization header containing the user's Access Token. The Access Token is issued via the Get AccessToken API.
Bearer ya29.A0ARrdaM9bZxZJ...The request succeeded and the connection for the user corresponding to the Access Token was successfully disconnected.
There is no Authorization header. error.data is an empty object, and error.reason is returned as Unknown Error.
This is an unclassified server error. If it keeps failing, please contact the partner support channel.
POST /api-partner/v1/apps-in-toss/user/oauth2/access/remove-by-access-token HTTP/1.1
Host: apps-in-toss-api.toss.im
Authorization: Bearer {accessToken}{
"resultType": "SUCCESS",
"success": {
"userKey": 123456789
}
}This is an API that disconnects the login connection for the user corresponding to userKey. The response includes only the userKey of the user whose connection was disconnected.
Business error code
The errors below respond with HTTP 200 and resultType: FAIL.
4050
It is not a mini app registered with the authentication server.
4095
The request limit has been exceeded. Please try again later.
This API can pass through the error codes of the connected internal system as is. Treat undocumented errorCode as a failure and refer to the reason message.
Request limit: 3,000 per minute per app
This is client-certificate-based mTLS authentication issued to the partner. The mini app is identified by the certificate's CN. Refer to the Use the server API document for how to issue and manage certificates.
Request to disconnect OAuth2 user connection by UserKey
This is the unique identifier of the user whose connection will be disconnected. It is used to identify the user in internal systems.
123456789The request succeeded, and the userKey of the user whose connection was disconnected based on userKey is returned.
The request body is not in the correct format. Check the field-by-field details in error.data.errorDetails.
This is an unclassified server error. If it keeps failing, please contact the partner support channel.
POST /api-partner/v1/apps-in-toss/user/oauth2/access/remove-by-user-key HTTP/1.1
Host: apps-in-toss-api.toss.im
Content-Type: application/json
{
"userKey": 123456789
}{
"resultType": "SUCCESS",
"success": {
"userKey": 123456789
}
}Was this helpful?