Adds an SSH public key and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login profile.
HTTP request
POST https://oslogin.googleapis.com/v1alpha/{parent=users/*}:importSshPublicKey
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003eThis endpoint imports an SSH public key for a specified user, identified by their unique ID in the format \u003ccode\u003eusers/{user}\u003c/code\u003e, and returns their profile information.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request utilizes a \u003ccode\u003ePOST\u003c/code\u003e method with a URL that follows gRPC Transcoding syntax, structured as \u003ccode\u003ehttps://oslogin.googleapis.com/v1alpha/{parent=users/*}:importSshPublicKey\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the user ID via the \u003ccode\u003eparent\u003c/code\u003e path parameter, and also accepts optional query parameters such as \u003ccode\u003eprojectId\u003c/code\u003e, \u003ccode\u003eview\u003c/code\u003e, and \u003ccode\u003eregions[]\u003c/code\u003e for additional configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include an \u003ccode\u003eSshPublicKey\u003c/code\u003e instance, while the response body, if successful, contains the user's \u003ccode\u003eloginProfile\u003c/code\u003e and import \u003ccode\u003edetails\u003c/code\u003e in JSON format.\u003c/p\u003e\n"],["\u003cp\u003eTo authorize the request, one of the following OAuth scopes is required: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/compute\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]