Symptoms
- Encountering HTTP 403 Forbidden error when calling `AuthenticationService.Instance.UpdatePlayerNameAsync` from the client.
- Error message includes: `Failed to update player name: HTTP/1.1 403 Forbidden`.
- Detailed error message: {"status":403,"title":"Forbidden","type":"https://services.docs.unity.com/docs/errors/#56","requestId":"XXXXXX","detail":"Access has been restricted","code":56}`.
Cause
The issue is caused by incorrect policy settings, which restrict access to the authentication service required to update the player name.
Resolution
To resolve this issue, update the policy to allow the necessary access by following these steps:
1. Ensure that your policy is correctly configured to allow access to the required subdomain. Instead of using "authentication", use the "social" subdomain.
{ "Sid": "allow-authentication-access", "Effect": "Allow", "Action": ["*"], "Principal": "Player", "Resource": "urn:ugs:social:/**" }
2. Update your existing policy to reflect these changes and test if the issue persists.
By applying these changes, the client-side API should function correctly, allowing players to use the authentication service without encountering the HTTP 403 Forbidden error.
If issues continue, please feel free to reach out for assistance via the portal.
Resources