Kakao.AspNetCore.SDK 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Kakao.AspNetCore.SDK --version 0.1.1                
NuGet\Install-Package Kakao.AspNetCore.SDK -Version 0.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kakao.AspNetCore.SDK" Version="0.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kakao.AspNetCore.SDK --version 0.1.1                
#r "nuget: Kakao.AspNetCore.SDK, 0.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Kakao.AspNetCore.SDK as a Cake Addin
#addin nuget:?package=Kakao.AspNetCore.SDK&version=0.1.1

// Install Kakao.AspNetCore.SDK as a Cake Tool
#tool nuget:?package=Kakao.AspNetCore.SDK&version=0.1.1                

Kakao.AspNetCore.SDK

Example : https://github.com/kakao-tam/Kakao.AspNetCore.SDK

ASP.NET Core 6.0 웹프로젝트 환경을 기준으로 제공되며, 라이브러리 내부적으로 세션과 API Controller를 포함하므로 Program.cs에 관련 설정이 있어야합니다.

사용 방법

설정

  1. 카카오 디벨로퍼스 설정에 Redirect URI와 Client Secret을 설정합니다.

  2. Program.cs에 초기화 설정을 합니다.

builder.Services.UseKakaoSDKInit("앱키", "클라이언트 시크릿");

카카오 로그인

인가 코드 요청 및 액세스 토큰 발급/저장
<a href="/oauth/authorize">KAKAO LOGIN</a>
사용자 정보 가져오기
GET /v2/user/me
사용자 정보 가져오기 : SDK 직접 호출
// Json Return 
string json = new UserApiClient().me();

// Model Object Return 
new UserApiClient().me((user, error) =>
{
    if (error != null)
    {
        Console.WriteLine("사용자 정보 가져오기 실패 {0}", error.ToString());
    }
    else if (user != null)
    {
        rtn = user;
        Console.WriteLine("사용자 정보 가져오기 성공");
        Console.WriteLine("회원번호: {0}", user.Id);
        Console.WriteLine("이메일: {0}", user.Kakao_Account?.Email);
        Console.WriteLine("닉네임: {0}", user.Kakao_Account?.Profile?.Nickname);
        Console.WriteLine("프로필사진: {0}", user.Kakao_Account?.Profile?.Thumbnail_Image_Url);
    }
});
토큰 정보 보기
GET /v1/user/access_token_info
로그아웃
GET /v1/user/logout
카카오계정과 함께 로그아웃
<a href="/oauth/logout">KAKAO LOGOUT</a>
연결끊기
GET /v1/user/unlink
동의 내역 확인하기
GET /v2/user/scopes

카카오 싱크

동의한 약관 확인하기
GET /v1/user/service/terms
배송지 조회하기
GET /v1/user/shipping_address

카카오톡 소셜

프로필 가져오기
GET /v1/api/talk/profile
프로필 가져오기 : SDK 직접 호출
// Json Return 
string json = new TalkApiClient().profile();

// Model Object Return 
new TalkApiClient().profile((profile, error) =>
{
    if (error != null)
    {
        Console.WriteLine("카카오톡 프로필 가져오기 실패 {0}", error.ToString());
    }
    else if (profile != null)
    {
        rtn = profile;
        Console.WriteLine("카카오톡 프로필 가져오기 성공");
        Console.WriteLine("닉네임: {0}", profile.Nickname);
        Console.WriteLine("프로필사진: {0}", profile.ProfileImageUrl);
        Console.WriteLine("국가코드: {0}", profile.CountryISO);
    }
});
친구 목록 가져오기
GET /v1/api/talk/friends

카카오톡 채널

카카오톡 채널 관계 확인하기
GET /v1/api/talk/channels
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.2 572 6/13/2022
0.1.1 414 6/13/2022
0.1.0 395 6/13/2022
0.0.10 434 6/7/2022
0.0.9 419 5/30/2022
0.0.8 391 5/19/2022
0.0.7 403 5/19/2022
0.0.6 398 5/18/2022
0.0.5 417 5/15/2022
0.0.4 418 5/12/2022
0.0.3 413 5/6/2022
0.0.2 422 5/6/2022
0.0.1 475 5/6/2022

alpha release 0.1.1
       - 의존성 주입 서비스 객체 제거
       -- BugFix. HttpContextAccessor 객체 의존성 주입 추가 복구

       - 카카오 로그인 및 액세스 토큰 저장 후, 이동할 페이지 설정 옵션 추가
       - 카카오계정과 함께 로그아웃 추가