[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Make Credential Manager calls on behalf of other parties for privileged apps\n\nPrivileged apps such as web browsers can make a Credential Manager call on\nbehalf of other relying parties by setting the `origin` parameter in Credential\nManager's [`GetCredentialRequest()`](/reference/androidx/credentials/GetCredentialRequest#GetCredentialRequest(kotlin.collections.List,kotlin.String,kotlin.Boolean,android.content.ComponentName,kotlin.Boolean)) and\n[`CreatePublicKeyCredentialRequest()`](/reference/androidx/credentials/CreatePublicKeyCredentialRequest#CreatePublicKeyCredentialRequest(kotlin.String,kotlin.ByteArray,kotlin.Boolean,kotlin.String,kotlin.Boolean)) methods.\n\nThe [`origin`](https://www.w3.org/TR/webauthn-2/#dom-collectedclientdata-origin) represents the application or website that a\nrequest comes from, and is used by passkeys to protect against phishing attacks.\nAn app's servers are required to check the client data `origin` against an\nallowlist of approved apps and websites. If the server receives a request from\nan app or website from an unrecognized origin, the request should be rejected.\nThis document describes how to set the origin for such privileged calling apps,\nand how to verify such apps are allowed to make calls on behalf of other\nparties.\n\nSet the origin of the calling app\n---------------------------------\n\nTo get credentials on behalf of another relying party, the credential provider\nthat supplies the credentials must add your app to a list of privileged callers\nthat are allowed to get such access. Then, use [`setOrigin()`](/reference/android/credentials/GetCredentialRequest.Builder#setOrigin(java.lang.String)) on\n[`createCredential()`](/reference/kotlin/androidx/credentials/CredentialManager#createCredential(android.content.Context,androidx.credentials.CreateCredentialRequest)) and [`getCredential()`](/reference/kotlin/androidx/credentials/CredentialManager#getCredential(android.content.Context,androidx.credentials.PrepareGetCredentialResponse.PendingGetCredentialHandle)) requests to set the\n`origin` value.\n| **Note:** The `origin` parameter in the `createCredential()` and `getCredential()` methods is only effective in API levels 34 (Android 14) and higher.\n\nFor privileged apps such as web browsers that need to handle third party\ncredentials, Google Password Manager requires approval to handle those\ncredentials. This ensures that only trusted apps are able to access and manage\nuser credentials for external services. To be approved for handling third party\ncredentials, [complete the request form](https://docs.google.com/forms/d/e/1FAIpQLScRuk9tTg0QPfSWl9SbpbIorX8xx2FCXlmoUYftCX2MxG4qyg/viewform) to open a ticket and\nhave your request reviewed."]]