Affected: Code References
Symptoms
When using code references, calls to the LaunchDarkly API fail with a 403 Forbidden error.
Cause
This error occurs when the API access token lacks the required permissions.
Common causes include:
The token does not have write permission for the
code-reference-repositoryresource.The token can modify a resource, but cannot view the project it belongs to, such as when the role is based on
no_accessand is missing theviewProjectaction.
Solution
Confirm the API access token has write permission for the
code-reference-repositoryresource. You can grant this through a base role, a LaunchDarkly-provided project role, or a custom role. To learn more, read: Code references.-
If the token permissions look correct but you still get a 403, confirm the role can view the project that contains the code references repository:
If the role was created from
no_access, make sure it includes theviewProjectaction. To learn more, read: Error: "Your administrator hasn’t given you permission to do anything yet."