Push 알림 관련 질문

문의 시, 디벨로퍼스 앱ID를 알려주세요.
___1084184

가이드의 내용대로 작성했는데 401 오류가 발생했습니다 google 비공개 키 쪽이 문제일까요?

I → POST https://kapi.kakao.com/v2/push/send
2024-06-17 20:16:15.786 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/json; charset=UTF-8
2024-06-17 20:16:15.786 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 219
2024-06-17 20:16:15.786 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I {“uuids”:[“17110993”],“push_message”:{“for_fcm”:{“collapse”:“user”,“time_to_live”:17200,“priority”:“normal”,“notification”:{“title”:“알림”,“body”:“…이 모임에 참여했습니다.”,“tag”:“user”}}},“by_pass”:false}
2024-06-17 20:16:15.786 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I → END POST (219-byte body)
2024-06-17 20:16:15.798 8034-8034 Choreographer com.bestapp.zipbab I Skipped 41 frames! The application may be doing too much work on its main thread.
2024-06-17 20:16:15.799 8034-8171 TrafficStats com.bestapp.zipbab D tagSocket(133) with statsTag=0xffffffff, statsUid=-1
2024-06-17 20:16:15.807 8034-8034 RecyclerView com.bestapp.zipbab E No adapter attached; skipping layout
2024-06-17 20:16:15.820 8034-8080 EGL_emulation com.bestapp.zipbab D app_time_stats: avg=215.22ms min=12.39ms max=3190.85ms count=16
2024-06-17 20:16:15.823 8034-8175 okhttp.OkHttpClient com.bestapp.zipbab I → POST https://kapi.kakao.com/v2/push/register
2024-06-17 20:16:15.823 8034-8175 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/x-www-form-urlencoded
2024-06-17 20:16:15.824 8034-8175 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 237
2024-06-17 20:16:15.825 8034-8175 okhttp.OkHttpClient com.bestapp.zipbab I uuid=17110993&device_id=dldbzO_IQx-Nuot0crWyGa&push_type=fcm&push_token=dldbzO_IQx-Nuot0crWyGa%3AAPA91bFuOXm5nzAJ0dLdfm2QmmFYIu8LTaBqSeENl2aIDGMhZ9Aplklw7Ue5YTFz5AS0p6rIKluwQOYX5qxskWRNJF5nqH_u_dIvuoREEUBmAeMj3ogYHWhr2Tbs7Ztu6GTXqbbaQIz_
2024-06-17 20:16:15.825 8034-8175 okhttp.OkHttpClient com.bestapp.zipbab I → END POST (237-byte body)
2024-06-17 20:16:15.827 8034-8049 OpenGLRenderer com.bestapp.zipbab I Davey! duration=717ms; Flags=0, FrameTimelineVsyncId=1577386, IntendedVsync=10297103731670, Vsync=10297787064976, InputEventId=475104521, HandleInputStart=10297797823700, AnimationStart=10297797896800, PerformTraversalsStart=10297798320200, DrawStart=10297805906700, FrameDeadline=10297120398336, FrameInterval=10297796839000, FrameStartTime=16666666, SyncQueued=10297807421300, SyncStart=10297807602700, IssueDrawCommandsStart=10297807725800, SwapBuffers=10297816940900, FrameCompleted=10297821580600, DequeueBufferDuration=16900, QueueBufferDuration=226800, GpuCompleted=10297821580600, SwapBuffersCompleted=10297818728600, DisplayPresentTime=0, CommandSubmissionCompleted=10297816940900,
2024-06-17 20:16:15.832 8034-8175 TrafficStats com.bestapp.zipbab D tagSocket(158) with statsTag=0xffffffff, statsUid=-1
2024-06-17 20:16:15.867 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I ← 401 Unauthorized https://kapi.kakao.com/v2/push/send (80ms)
2024-06-17 20:16:15.867 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Date: Mon, 17 Jun 2024 11:16:17 GMT
2024-06-17 20:16:15.867 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Server: Apache
2024-06-17 20:16:15.867 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Origin: *
2024-06-17 20:16:15.867 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
2024-06-17 20:16:15.868 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Headers: Content-Type,X-Requested-With,Accept,Authorization,Origin,KA,Cache-Control,Pragma
2024-06-17 20:16:15.868 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I X-Request-ID: 323640d7-f89e-4942-824c-97cb951ae370
2024-06-17 20:16:15.868 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I WWW-Authenticate: KakaoAK error=invalid_token
2024-06-17 20:16:15.868 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Caller-AppId: 1084184
2024-06-17 20:16:15.868 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/json;charset=UTF-8
2024-06-17 20:16:15.869 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 74
2024-06-17 20:16:15.869 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Keep-Alive: timeout=10, max=500
2024-06-17 20:16:15.869 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I Connection: Keep-Alive
2024-06-17 20:16:15.870 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I {“msg”:“appKeyType is REST_API_KEY. but expected [ADMIN_KEY]”,“code”:-401}
2024-06-17 20:16:15.870 8034-8171 okhttp.OkHttpClient com.bestapp.zipbab I ← END HTTP (74-byte body)
2024-06-17 20:16:15.884 8034-8034 AndroidRuntime com.bestapp.zipbab E FATAL EXCEPTION: main
Process: com.bestapp.zipbab, PID: 8034
retrofit2.HttpException: HTTP 401 Unauthorized
at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:164)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@a9a9d59, Dispatchers.Main.immediate]
2024-06-17 20:16:15.891 8034-8034 Process com.bestapp.zipbab I Sending signal. PID: 8034 SIG: 9
2024-06-17 20:16:45.813 8186-8186 ApplicationLoaders com.bestapp.zipbab D Returning zygote-cached class loader: /system_ext/framework/androidx.window.extensions.jar
2024-06-17 20:16:45.813 8186-8186 ApplicationLoaders com.bestapp.zipbab D Returning zygote-cached class loader: /system_ext/framework/androidx.window.sidecar.jar
2024-06-17 20:16:45.816 8186-8186 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes11.dm’: No such file or directory
2024-06-17 20:16:45.816 8186-8186 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes17.dm’: No such file or directory
2024-06-17 20:16:45.817 8186-8186 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes7.dm’: No such file or directory
2024-06-17 20:16:45.818 8186-8186 ziparchive com.bestapp.zipbab W Unable to open ‘/data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/base.dm’: No such file or directory
2024-06-17 20:16:45.818 8186-8186 ziparchive com.bestapp.zipbab W Unable to open ‘/data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/base.dm’: No such file or directory
2024-06-17 20:16:46.031 8186-8186 nativeloader com.bestapp.zipbab D Configuring clns-6 for other apk /data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/lib/x86_64:/data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/base.apk!/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/com.bestapp.zipbab
2024-06-17 20:16:46.055 8186-8186 GraphicsEnvironment com.bestapp.zipbab V Currently set values for:
2024-06-17 20:16:46.055 8186-8186 GraphicsEnvironment com.bestapp.zipbab V angle_gl_driver_selection_pkgs=[]
2024-06-17 20:16:46.055 8186-8186 GraphicsEnvironment com.bestapp.zipbab V angle_gl_driver_selection_values=[]
2024-06-17 20:16:46.055 8186-8186 GraphicsEnvironment com.bestapp.zipbab V ANGLE GameManagerService for com.bestapp.zipbab: false
2024-06-17 20:16:46.055 8186-8186 GraphicsEnvironment com.bestapp.zipbab V com.bestapp.zipbab is not listed in per-application setting
2024-06-17 20:16:46.055 8186-8186 GraphicsEnvironment com.bestapp.zipbab V Neither updatable production driver nor prerelease driver is supported.
2024-06-17 20:16:46.080 8186-8186 Compatibil…geReporter com.bestapp.zipbab D Compat change id reported: 183155436; UID 10192; state: ENABLED
2024-06-17 20:16:46.116 8186-8186 FirebaseApp com.bestapp.zipbab I Device unlocked: initializing all Firebase APIs for app [DEFAULT]
2024-06-17 20:16:46.322 8186-8186 FirebaseSessions com.bestapp.zipbab D Initializing Firebase Sessions SDK.
2024-06-17 20:16:46.324 8186-8214 FirebaseSessions com.bestapp.zipbab D No Sessions subscribers. Not listening to lifecycle events.
2024-06-17 20:16:46.330 8186-8186 Compatibil…geReporter com.bestapp.zipbab D Compat change id reported: 3400644; UID 10192; state: ENABLED
2024-06-17 20:16:46.377 8186-8186 FirebaseInitProvider com.bestapp.zipbab I FirebaseApp initialization successful
2024-06-17 20:16:46.467 8186-8229 TRuntime.C…ortBackend com.bestapp.zipbab I Making request to: https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/batchlog
2024-06-17 20:16:46.480 8186-8229 TrafficStats com.bestapp.zipbab D tagSocket(76) with statsTag=0xffffffff, statsUid=-1
2024-06-17 20:16:48.798 8186-8229 TRuntime.C…ortBackend com.bestapp.zipbab I Status Code: 200
2024-06-17 20:16:51.926 8186-8236 ProfileInstaller com.bestapp.zipbab D Installing profile for com.bestapp.zipbab

로그에 카카오에서 전달한 상세 메시지가 있네요.

I {“msg”:“appKeyType is REST_API_KEY. but expected [ADMIN_KEY]”,“code”:-401}

API 호출 시, REST_API_KEY ADMIN_KEY 를 사용해주세요.

rest api key값을 사용했는데도 문제가 생깁니다 등록할때는 정상작동했는데 알림 전송 기능이 작동하지않습니다.

관련 에러로그 다시 첨부해주시겠어요?

등록만 헀을떄 결과 입니다
→ POST https://kapi.kakao.com/v2/push/register
2024-06-18 10:13:05.219 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/x-www-form-urlencoded
2024-06-18 10:13:05.219 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 235
2024-06-18 10:13:05.222 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I uuid=123456&device_id=dldbzO_IQx-Nuot0crWyGa&push_type=fcm&push_token=dldbzO_IQx-Nuot0crWyGa%3AAPA91bFuOXm5nzAJ0dLdfm2QmmFYIu8LTaBqSeENl2aIDGMhZ9Aplklw7Ue5YTFz5AS0p6rIKluwQOYX5qxskWRNJF5nqH_u_dIvuoREEUBmAeMj3ogYHWhr2Tbs7Ztu6GTXqbbaQIz_
2024-06-18 10:13:05.223 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I → END POST (235-byte body)
2024-06-18 10:13:05.235 5684-5811 TrafficStats com.bestapp.zipbab D tagSocket(122) with statsTag=0xffffffff, statsUid=-1
2024-06-18 10:13:05.310 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I ← 200 OK https://kapi.kakao.com/v2/push/register (86ms)
2024-06-18 10:13:05.310 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Date: Tue, 18 Jun 2024 01:13:06 GMT
2024-06-18 10:13:05.310 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Server: Apache
2024-06-18 10:13:05.310 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Origin: *
2024-06-18 10:13:05.310 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
2024-06-18 10:13:05.310 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Headers: Content-Type,X-Requested-With,Accept,Authorization,Origin,KA,Cache-Control,Pragma
2024-06-18 10:13:05.311 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I X-Request-ID: 005736e6-f128-4bf6-a6d5-95ee3f693510
2024-06-18 10:13:05.311 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Quota-Type: INC_AND_CHECK
2024-06-18 10:13:05.311 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/json;charset=UTF-8
2024-06-18 10:13:05.311 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 2
2024-06-18 10:13:05.311 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Keep-Alive: timeout=10, max=500
2024-06-18 10:13:05.311 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I Connection: Keep-Alive
2024-06-18 10:13:05.312 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I -1
2024-06-18 10:13:05.312 5684-5811 okhttp.OkHttpClient com.bestapp.zipbab I ← END HTTP (2-byte body)

들록 + 알림 전송

→ POST https://kapi.kakao.com/v2/push/register
2024-06-18 10:15:22.031 5871-6001 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/x-www-form-urlencoded
2024-06-18 10:15:22.031 5871-6001 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 235
2024-06-18 10:15:22.032 5871-6001 okhttp.OkHttpClient com.bestapp.zipbab I uuid=123456&device_id=dldbzO_IQx-Nuot0crWyGa&push_type=fcm&push_token=dldbzO_IQx-Nuot0crWyGa%3AAPA91bFuOXm5nzAJ0dLdfm2QmmFYIu8LTaBqSeENl2aIDGMhZ9Aplklw7Ue5YTFz5AS0p6rIKluwQOYX5qxskWRNJF5nqH_u_dIvuoREEUBmAeMj3ogYHWhr2Tbs7Ztu6GTXqbbaQIz_
2024-06-18 10:15:22.032 5871-6001 okhttp.OkHttpClient com.bestapp.zipbab I → END POST (235-byte body)
2024-06-18 10:15:22.035 5871-6001 TrafficStats com.bestapp.zipbab D tagSocket(113) with statsTag=0xffffffff, statsUid=-1
2024-06-18 10:15:22.075 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I ← 401 Unauthorized https://kapi.kakao.com/v2/push/send (75ms)
2024-06-18 10:15:22.075 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Date: Tue, 18 Jun 2024 01:15:23 GMT
2024-06-18 10:15:22.075 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Server: Apache
2024-06-18 10:15:22.075 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Origin: *
2024-06-18 10:15:22.075 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
2024-06-18 10:15:22.076 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Headers: Content-Type,X-Requested-With,Accept,Authorization,Origin,KA,Cache-Control,Pragma
2024-06-18 10:15:22.076 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I X-Request-ID: 82d14720-29ed-407d-a993-79d599f10603
2024-06-18 10:15:22.076 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I WWW-Authenticate: KakaoAK error=invalid_token
2024-06-18 10:15:22.076 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Caller-AppId: 1084184
2024-06-18 10:15:22.076 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/json;charset=UTF-8
2024-06-18 10:15:22.077 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 74
2024-06-18 10:15:22.077 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Keep-Alive: timeout=10, max=500
2024-06-18 10:15:22.077 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I Connection: Keep-Alive
2024-06-18 10:15:22.078 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I {“msg”:“appKeyType is REST_API_KEY. but expected [ADMIN_KEY]”,“code”:-401}
2024-06-18 10:15:22.078 5871-5997 okhttp.OkHttpClient com.bestapp.zipbab I ← END HTTP (74-byte body)
2024-06-18 10:15:22.087 5871-5871 AndroidRuntime com.bestapp.zipbab E FATAL EXCEPTION: main
Process: com.bestapp.zipbab, PID: 5871
retrofit2.HttpException: HTTP 401 Unauthorized
at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:164)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@d78e7dc, Dispatchers.Main.immediate]
---------------------------- PROCESS ENDED (5871) for package com.bestapp.zipbab ----------------------------
2024-06-18 10:15:22.099 5871-5871 Process com.bestapp.zipbab I Sending signal. PID: 5871 SIG: 9
---------------------------- PROCESS STARTED (6012) for package com.bestapp.zipbab ----------------------------
2024-06-18 10:16:08.326 6012-6012 ApplicationLoaders com.bestapp.zipbab D Returning zygote-cached class loader: /system_ext/framework/androidx.window.extensions.jar
2024-06-18 10:16:08.326 6012-6012 ApplicationLoaders com.bestapp.zipbab D Returning zygote-cached class loader: /system_ext/framework/androidx.window.sidecar.jar
2024-06-18 10:16:08.329 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes11.dm’: No such file or directory
2024-06-18 10:16:08.329 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes17.dm’: No such file or directory
2024-06-18 10:16:08.330 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes12.dm’: No such file or directory
2024-06-18 10:16:08.331 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes15.dm’: No such file or directory
2024-06-18 10:16:08.332 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes16.dm’: No such file or directory
2024-06-18 10:16:08.333 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes19.dm’: No such file or directory
2024-06-18 10:16:08.333 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes23.dm’: No such file or directory
2024-06-18 10:16:08.334 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes4.dm’: No such file or directory
2024-06-18 10:16:08.334 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/data/com.bestapp.zipbab/code_cache/.overlay/base.apk/classes7.dm’: No such file or directory
2024-06-18 10:16:08.335 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/base.dm’: No such file or directory
2024-06-18 10:16:08.335 6012-6012 ziparchive com.bestapp.zipbab W Unable to open ‘/data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/base.dm’: No such file or directory
2024-06-18 10:16:08.551 6012-6012 nativeloader com.bestapp.zipbab D Configuring clns-6 for other apk /data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/lib/x86_64:/data/app/~~tJ3QYQ_Y-0k3l38YfBLASQ==/com.bestapp.zipbab-hLEW8xh6sqc8sZ3wdwCKTw==/base.apk!/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/com.bestapp.zipbab
2024-06-18 10:16:08.576 6012-6012 GraphicsEnvironment com.bestapp.zipbab V Currently set values for:
2024-06-18 10:16:08.576 6012-6012 GraphicsEnvironment com.bestapp.zipbab V angle_gl_driver_selection_pkgs=[]
2024-06-18 10:16:08.576 6012-6012 GraphicsEnvironment com.bestapp.zipbab V angle_gl_driver_selection_values=[]
2024-06-18 10:16:08.576 6012-6012 GraphicsEnvironment com.bestapp.zipbab V ANGLE GameManagerService for com.bestapp.zipbab: false
2024-06-18 10:16:08.577 6012-6012 GraphicsEnvironment com.bestapp.zipbab V com.bestapp.zipbab is not listed in per-application setting
2024-06-18 10:16:08.577 6012-6012 GraphicsEnvironment com.bestapp.zipbab V Neither updatable production driver nor prerelease driver is supported.
2024-06-18 10:16:08.601 6012-6012 Compatibil…geReporter com.bestapp.zipbab D Compat change id reported: 183155436; UID 10192; state: ENABLED
2024-06-18 10:16:08.636 6012-6012 FirebaseApp com.bestapp.zipbab I Device unlocked: initializing all Firebase APIs for app [DEFAULT]
2024-06-18 10:16:08.879 6012-6012 FirebaseSessions com.bestapp.zipbab D Initializing Firebase Sessions SDK.
2024-06-18 10:16:08.882 6012-6049 FirebaseSessions com.bestapp.zipbab D No Sessions subscribers. Not listening to lifecycle events.
2024-06-18 10:16:08.884 6012-6012 Compatibil…geReporter com.bestapp.zipbab D Compat change id reported: 3400644; UID 10192; state: ENABLED
2024-06-18 10:16:08.888 6012-6012 FirebaseInitProvider com.bestapp.zipbab I FirebaseApp initialization successful
2024-06-18 10:16:08.967 6012-6054 TRuntime.C…ortBackend com.bestapp.zipbab I Making request to: https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/batchlog
2024-06-18 10:16:08.982 6012-6054 TrafficStats com.bestapp.zipbab D tagSocket(76) with statsTag=0xffffffff, statsUid=-1
2024-06-18 10:16:11.371 6012-6054 TRuntime.C…ortBackend com.bestapp.zipbab I Status Code: 200
2024-06-18 10:16:14.447 6012-6061 ProfileInstaller com.bestapp.zipbab D Installing profile for com.bestapp.zipbab

오류가 뜨면서 앱이 종료됩니다.

아. 반대로 알려드렸네요. 어드민키를 사용해야하네요. 변경 후, 다시 호출해보시겠어요?

푸시 알림 보내기 https://developers.kakao.com/docs/latest/ko/push/rest-api#push-alarm

admin키를 사용했을떄는 400오류가 restapi키를 사용했을때는 401 오류가 뜨는것같습니다.

2024-06-18 10:40:06.382 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I → POST https://kapi.kakao.com/v2/push/send
2024-06-18 10:40:06.382 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/json; charset=UTF-8
2024-06-18 10:40:06.382 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 217
2024-06-18 10:40:06.383 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I {“uuids”:[“123456”],“push_message”:{“for_fcm”:{“collapse”:“user”,“time_to_live”:17200,“priority”:“normal”,“notification”:{“title”:“알림”,“body”:“…이 모임에 참여했습니다.”,“tag”:“user”}}},“by_pass”:false}
2024-06-18 10:40:06.383 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I → END POST (217-byte body)
2024-06-18 10:40:06.387 6397-6525 TrafficStats com.bestapp.zipbab D tagSocket(157) with statsTag=0xffffffff, statsUid=-1
2024-06-18 10:40:06.396 6397-6397 Choreographer com.bestapp.zipbab I Skipped 37 frames! The application may be doing too much work on its main thread.
2024-06-18 10:40:06.403 6397-6397 RecyclerView com.bestapp.zipbab E No adapter attached; skipping layout
2024-06-18 10:40:06.413 6397-6443 EGL_emulation com.bestapp.zipbab D app_time_stats: avg=96.81ms min=1.45ms max=3962.00ms count=46
2024-06-18 10:40:06.415 6397-6529 ProfileInstaller com.bestapp.zipbab D Installing profile for com.bestapp.zipbab
2024-06-18 10:40:06.416 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I → POST https://kapi.kakao.com/v2/push/register
2024-06-18 10:40:06.417 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/x-www-form-urlencoded
2024-06-18 10:40:06.417 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 235
2024-06-18 10:40:06.417 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I uuid=123456&device_id=dldbzO_IQx-Nuot0crWyGa&push_type=fcm&push_token=dldbzO_IQx-Nuot0crWyGa%3AAPA91bFuOXm5nzAJ0dLdfm2QmmFYIu8LTaBqSeENl2aIDGMhZ9Aplklw7Ue5YTFz5AS0p6rIKluwQOYX5qxskWRNJF5nqH_u_dIvuoREEUBmAeMj3ogYHWhr2Tbs7Ztu6GTXqbbaQIz_
2024-06-18 10:40:06.418 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I → END POST (235-byte body)
2024-06-18 10:40:06.421 6397-6530 TrafficStats com.bestapp.zipbab D tagSocket(123) with statsTag=0xffffffff, statsUid=-1
2024-06-18 10:40:06.456 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I ← 400 Bad Request https://kapi.kakao.com/v2/push/send (72ms)
2024-06-18 10:40:06.456 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Date: Tue, 18 Jun 2024 01:40:07 GMT
2024-06-18 10:40:06.456 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Server: Apache
2024-06-18 10:40:06.456 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Origin: *
2024-06-18 10:40:06.457 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
2024-06-18 10:40:06.457 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Headers: Content-Type,X-Requested-With,Accept,Authorization,Origin,KA,Cache-Control,Pragma
2024-06-18 10:40:06.457 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I X-Request-ID: edb16909-141c-471f-87e3-546f4dadc02a
2024-06-18 10:40:06.457 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Caller-AppId: 1084184
2024-06-18 10:40:06.457 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/json;charset=UTF-8
2024-06-18 10:40:06.457 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 40
2024-06-18 10:40:06.458 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I Connection: close
2024-06-18 10:40:06.458 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I {“msg”:“uuids can’t be null.”,“code”:-2}
2024-06-18 10:40:06.458 6397-6525 okhttp.OkHttpClient com.bestapp.zipbab I ← END HTTP (40-byte body)
2024-06-18 10:40:06.466 6397-6397 AndroidRuntime com.bestapp.zipbab E FATAL EXCEPTION: main
Process: com.bestapp.zipbab, PID: 6397
retrofit2.HttpException: HTTP 400 Bad Request
at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:164)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@886068b, Dispatchers.Main.immediate]
2024-06-18 10:40:06.494 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I ← 200 OK https://kapi.kakao.com/v2/push/register (76ms)
2024-06-18 10:40:06.494 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Date: Tue, 18 Jun 2024 01:40:07 GMT
2024-06-18 10:40:06.494 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Server: Apache
2024-06-18 10:40:06.494 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Origin: *
2024-06-18 10:40:06.495 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
2024-06-18 10:40:06.495 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Access-Control-Allow-Headers: Content-Type,X-Requested-With,Accept,Authorization,Origin,KA,Cache-Control,Pragma
2024-06-18 10:40:06.495 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I X-Request-ID: 14d3f678-b453-4270-b102-9bf84d60403f
2024-06-18 10:40:06.495 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Quota-Type: INC_AND_CHECK
2024-06-18 10:40:06.495 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Content-Type: application/json;charset=UTF-8
2024-06-18 10:40:06.495 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Content-Length: 2
2024-06-18 10:40:06.496 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Keep-Alive: timeout=10, max=500
2024-06-18 10:40:06.496 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I Connection: Keep-Alive
2024-06-18 10:40:06.497 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I -1
2024-06-18 10:40:06.497 6397-6530 okhttp.OkHttpClient com.bestapp.zipbab I ← END HTTP (2-byte body)
2024-06-18 10:40:11.560 6397-6402 .bestapp.zipbab com.bestapp.zipbab I Thread[3,tid=6402,WaitingInMainSignalCatcherLoop,Thread*=0x7b87b5442200,peer=0x154c0e78,“Signal Catcher”]: reacting to signal 3

혹시 전송 할때 데이터 형식때문에 생기는 문제일까요?

/v2/push/register 에 등록한 uuid 를 /v2/push/send 호출할때 설정해야하는데 안한 것 같아요.

혹시 전송할떄 파라미터 형식을 봐주실수 있으실까요?

/v2/push/send 는 body 파라메터로 아무것도 안들어왔어요.

x-www-form-urlencoded 타입으로 Body에 쿼리스트링 세팅해서 전송하셔야하는데요.
확인 부탁드려요.

REST API | Kakao Developers REST API

data class 형식 예제가있을까요 kakao푸시알림은 참고할곳이 없어서 자료가 필요합니다.

푸시알림은 앱이 설치된 기기에 OS 알림을 띄우는 기능입니다.
서버에서 호출하지 않고 앱에서 호출하는 부분이 잘 이해가지 않는데요.

그리고 어드민키는 노출되지 않도록 백엔드에서 사용을 권장 필수로하고 있습니다.

2.1. 앱 키 보안 보안 권장사항 | Kakao Developers 보안 권장사항

앱에서 백엔드로 푸시 알림 요청하고 백엔드에서 API 호출하는 형태로 구현해보시겠어요?

언어별 x-www-form-urlencoded 예제는 FAQ 13. REST API 에 있습니다.

참고 부탁드려요.

저희가 따로 서버를 이용할수없는상황이라 firestore에 저장 후에 호출하는 방식으로 사용중입니다.

향후 보안 문제가 발생할 여지가 있으므로 백엔드 서버 검토 부탁드려요.