---
title: "createCredentialRegistrationRequest(challenge:name:userID:)"
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: "authenticationservices/asauthorizationplatformpublickeycredentialprovider/createcredentialregistrationrequest(challenge:name:userid:)"
---

# createCredentialRegistrationRequest(challenge:name:userID:)

Creates a registration request with a challenge, name, and user ID.

## Declaration

```swift
func createCredentialRegistrationRequest(challenge: Data, name: String, userID: Data) -> ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest
```

## Parameters

- `challenge`: A stream of bytes that the server provides to prove an authenticator is valid.
- `name`: The name of the user.
- `userID`: A user identifier.

## Return Value

Return Value A public key credential registration request.

## See Also

### Creating the request

- [relyingPartyIdentifier](authenticationservices/asauthorizationplatformpublickeycredentialprovider/relyingpartyidentifier.md)
- [createCredentialAssertionRequest(challenge:)](authenticationservices/asauthorizationplatformpublickeycredentialprovider/createcredentialassertionrequest(challenge:).md)
- [createCredentialRegistrationRequest(challenge:name:userID:requestStyle:)](authenticationservices/asauthorizationplatformpublickeycredentialprovider/createcredentialregistrationrequest(challenge:name:userid:requeststyle:).md)
