JQ331
9월 2, 2021, 3:47오후
3
정상적으로 작동하게 만들었습니다. @RGJ 님이 친절하게 다음 사항을 지적해 주셨습니다:
Discourse가 리다이렉트를 수행하고 API 키를 리다이렉트 URL의 페이로드로 인코딩하여 전송할 때, 해당 키는 URL 인코딩을 거칩니다. 따라서 실제 API 키를 얻으려면 페이로드에 URL 디코딩을 수행해야 합니다. 그 결과, 제대로 작동하는 API 키(화면에 표시된 키의 길이에 일치)를 얻을 수 있습니다.
이 작업을 정상적으로 수행하기 위해 제가 따르는 단계는 다음과 같습니다:
I have gotten this to work, after some trial and error.
Here are the basic steps that I follow when: I have a separate app that I have coded, and I want users to be able to use that app to make API calls to a discourse site.
To do that, I need to generate a per-user API token to make calls on behalf of each specific user (at least in a nodejs/javascript environment).
Note that for the javascript side of things, I found the code that @KengoTODA provided here: discourse-api-key-generator/src/i…