🔑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

Request Variable Information

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

Request Variable Information

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

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

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 Example

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

Response 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