# Service ID

Use [Sign in with Apple](https://developer.apple.com/sign-in-with-apple/) to let your users sign in to your app’s accompanying **website** with their Apple ID. To configure web authentication, you must create a Services ID and associate your website to an existing primary iOS, macOS, tvOS, or watchOS App ID enabled for [Sign in with Apple](https://developer.apple.com/sign-in-with-apple/).

1. [Create Service ID](#create-service-id)
2. [Find Service ID using Apple Developer Portal](#find-service-id-using-apple-developer-portal)

## Create Service ID

1. In [Certificates, Identifiers & Profiles](https://developer.apple.com/account/resources), click Identifiers in the sidebar, then click the add button (+) on the top left.
2. Select Services ID, then click Continue.

   <figure><img src="https://760328771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwSkuCpTNI_AerL8J2a%2Fuploads%2F0q9AWixLdL1tFnBK70EV%2FScreenshot%202022-12-29%20at%2014.55.39.png?alt=media&#x26;token=aac4b5a0-af41-48bb-a0c6-f14c3ec78fdc" alt="Select Services ID, then click Continue"><figcaption><p>Select Services ID, then click Continue</p></figcaption></figure>
3. Enter the Services ID description and provide a unique identifier.

   <figure><img src="https://760328771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwSkuCpTNI_AerL8J2a%2Fuploads%2Fd8hawyqJ7iR5OTzSi714%2FScreenshot%202022-12-29%20at%2014.57.27.png?alt=media&#x26;token=1488aa15-590e-470f-b4c9-f1a4208a2abd" alt="Use unique identifier not Bundle ID of any app"><figcaption><p>Use unique identifier not Bundle ID of any app</p></figcaption></figure>
4. Register the Services ID and select it from the list to start configuration.
5. Select Sign in with Apple, then click Configure.
6. Select your app from the list of primary App IDs related to your website in the modal that appears.
7. Under Website URLs, provide **api.codemash.io** in the *Somains and Subdomains* section, and set **<https://api.codemash.io/auth/apple>** as *Return URLs*.

   <figure><img src="https://760328771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwSkuCpTNI_AerL8J2a%2Fuploads%2FI5gqSilR6uWlM5dLdejZ%2FScreenshot%202022-12-29%20at%2014.58.18.png?alt=media&#x26;token=f7913a28-9c49-4dea-8465-5c6fc5f8dc0f" alt="Under Website URLs, provide api.codemash.io in the Somains and Subdomains section, and set https://api.codemash.io/auth/apple as Return URLs."><figcaption></figcaption></figure>
8. Click Done to store your configuration.
9. Click Continue.
10. Review the configuration, then click Save.

## Find Service ID using Apple Developer Portal

1. Go to the [Apple Developer Portal](https://docs.codemash.io/other-topics/apple/developer-portal) and sign in with your Apple ID.
2. From the home page, click on the "Identifiers" link.

   <figure><img src="https://760328771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwSkuCpTNI_AerL8J2a%2Fuploads%2FgRBvUfkHbuW64TLjKzNV%2FAccount%20-%20Page%204.png?alt=media&#x26;token=a969c41d-36e3-4eb5-ae49-db770122e077" alt=""><figcaption><p>Press "Identifiers" link</p></figcaption></figure>
3. You will see a list of all registered identifiers to your account. Please ensure that the "**Services IDs"** filter is selected on the right side of the screen.

   <figure><img src="https://760328771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwSkuCpTNI_AerL8J2a%2Fuploads%2FEnm2X6g6jg8i1tIgodT1%2FAccount%20-%20Page%207.png?alt=media&#x26;token=41e4c30e-4684-4b83-97b6-d8b812e1d908" alt=""><figcaption></figcaption></figure>
4. Filter and find services by description or identifier.
5. The identifier is your Service ID

{% hint style="info" %}
Here is the original Apple documentation - <https://developer.apple.com/help/account/configure-app-capabilities/configure-sign-in-with-apple-for-the-web>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codemash.io/other-topics/apple/service-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
