🔑Elice Login Integration Development Guide

This document provides the development process for integrating login with Elice using OAuth.

1. Registering an Application

To integrate Elice login, you need to register an application name and Redirect URI. Please send the following information to backend@elicer.com, and we will register it internally and provide further instructions.

  • Application name

  • Redirect URI (up to 5, https required)

    • Enter the address of the page where you want to receive the login completion results. (Example: https://my-site.com/elice/oauth/okay)

After the internal registration process is complete, we will provide you with the following information:

  • client_id

  • client_secret

  • ELICE_WEB_URL (development)

  • ELICE_SERVER_URL (development)

  • ELICE_WEB_URL (production)

  • ELICE_SERVER_URL (production)

2. Generating the Elice Login Integration URL

To redirect users to the Elice login page when they click the Elice login integration button, we will introduce how to make the API call.

When you fill in the following request variables and make an API call, the user will be redirected to the Elice login page.

After the user completes the login on that page, they will be redirected back to the Redirect URI along with the result.

Request URL Information

MethodRequest URLResponse TypeDescription

GET

https://{ELICE_WEB_URL}/oauth/authorize

URL Redirect

Request Elice login auth.

Request Variable Information

Request VariableTypeRequiredDefaultDescription

client_id

string

Y

-

Client ID value issued during application registration

redirect_uri

string

Y

-

One of the Redirect URI values entered during application registration (URL encoding required)

state

string

Y

-

Random string value generated each time for security

scope

string

Y

read

List of comma-separated permissions

lang

string

Y

ko

Value to distinguish the language used

Request Example

curl -X GET "https://{ELICE_WEB_URL}/oauth/authorize?client_id=myclientid&redirect_uri=redirect_uri=https%3A%2F%2Fmy-site.com%2Felice%2Fouath%2Fokay&state=om22bsq0jz&scope=read&lang=ko"

Response Example

HTTP/1.1 302 Found
Location: https://my-site.com/elice/ouath/okay?code=okaycode12345&state=om22bsq0jz

3. Requesting Access Token Issuance

After being redirected to the Redirect URI, the authentication code (code) received through the query string is used to issue an access token.

The authentication code is disposable and cannot be reused after being used to issue the access token.

The access token is used when calling Elice REST APIs such as the user information API.

This API should be executed on the server, not the user's browser.

Request URL Information

MethodRequest URLResponse TypeDescription

POST

https://{ELICE_SERVER_URL}/oauth/token

json

Request access token issuance

Request Variable Information

Request VariableTypeRequiredDefaultDescription

client_id

string

Y

-

Client ID value issued during application registration

client_secret

string

Y

-

Client Secret value issued during application registration

code

string

Y

-

Authentication code received through the Redirect URI

Request Example

curl -X POST "https://{ELICE_SERVER_URL}/oauth/token" \
    -H "Content-Type: application/json" \
    -d '{"client_id":"myclientid","client_secret":"myclientsecret","code": "okaycode12345"}'

Response Information

FieldTypeDescription

access_token

string

Access token (expires after 1 hour from issuance)

Response Example

HTTP/1.1 200 OK
Content-Type: application/json

{
"access_token": "your_access_token"
}

4. Calling the User Information API Using the Access Token

It is possible to call the user information retrieval API using the access token.

Request URL Information

MethodAuthenticationRequest URLResponse TypeDescription

GET

OAuth2.0

https://{ELICE_SERVER_URL}/oauth/account

JSON

Retrieve User Information

Request Variable Information

There are no separate request variables. When calling the request URL, simply pass the access token value in the request header as shown below:

Request Header

Request HeaderDescription

Authorization

Value in the following format: Bearer {access token}

Request Example

curl -X GET "https://{ELICE_SERVER_URL}/oauth/account" \
    -H "Authorization: Bearer your_access_token"

Response Information

FieldTypeRequiredDescription

id

String

Y

Unique identifier

fullname

String

Y

User's name

email

String

Y

User's email address

phone

String

Y

User's phone number

profile_url

String

Y

URL of user's profile picture

locale

String

Y

User's locale information

Response Example

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 12345,
  "fullname": "John Doe",
  "email": "john.doe@example.com",
  "phone": "010-1234-5678",
  "profile_url": "https://example.com/profile/johndoe",
  "locale": "ko"
}

Last updated