a2tt

Serverless OAuth Login API (2018)

πŸ’³πŸ—οΈπŸ›‚πŸ”‘
Serverless OAuth Login API 1

Comment

"It’s a savior that has been helping some of my bots operate reliably for over three years."

Team Member

a2tt

Service Period

Nov 5, 2018 ~ (personal usage only)

Status

In service

Link

N/A

Introduction

Naver, Korea's largest portal site, has an interest-based community service, Cafe. In order for the Community Post Ranking Bot to work reliably, it was necessary to use the Naver Cafe API.
In order to get access token used to call the API from a serverless resource, it should be possible to log in to Naver in RESTful way. For that, compressing, encoding and encryption should be applied to a lot of data, and the result should be sent to the server to finalize login process.
In general, javascript does this on the page, but I wanted to make an API that is responsible for this so that it could be used for multiple projects. I also wanted to implement the login process by myself without using browser automation tools like selenium.

Skills

AWS - Lambda, API Gateway, VPC, EC2
NAT instance
Python, JavaScript

Features

  • It applies compression, encoding, and encryption to many data and transmits it to the Naver server to log in. In the logged-in session, it goes to the OAuth login page, receives an access token, and returns it to the requester.
  • It returns a payload that is required for the requester to log in by itself.
  • It provides an API through which the requester can upload a post.