userId 값을 사용하여 사용자의 새 세션을 만듭니다. 로그인한 사용자에 관한 자세한 내용은 사용자 및 새 이벤트를 참고하세요.
files.create 메서드를 사용하여 파일 리소스를 만듭니다. 요청에 folderId가 설정된 경우 parents 필드를 folderId 값으로 설정합니다.
요청에 folderResourceKey가 설정된 경우 X-Goog-Drive-Resource-Keys 요청 헤더를 설정합니다. 리소스 키에 관한 자세한 내용은 리소스 키를 사용하여 링크 공유 파일에 액세스를 참고하세요.
state 매개변수는 URL로 인코딩되므로 앱에서 이스케이프 문자를 처리하고 JSON으로 파싱해야 합니다.
사용자 및 새 이벤트
Drive 앱은 모든 '만들기' 이벤트를 잠재적인 로그인으로 처리해야 합니다. 일부 사용자에게는 여러 계정이 있을 수 있으므로 state 매개변수의 사용자 ID가 현재 세션과 일치하지 않을 수 있습니다. state 매개변수의 사용자 ID가 현재 세션과 일치하지 않으면 앱의 현재 세션을 종료하고 요청된 사용자로 로그인합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-11-28(UTC)"],[[["When a user creates a new file with your app from Drive UI, your app receives a `state` parameter containing action, folder details, and user ID."],["Your app should verify the `action` is \"create\", create a user session, and use the provided information to create a new file via the Drive API."],["All \"create\" events should be treated as potential sign-ins and handled to accommodate users with multiple accounts, potentially requiring session switching."],["The `state` parameter is URL-encoded and needs to be parsed as JSON by your application for proper data extraction."]]],[]]