401 not authorization projects/create

used ALM: github
ci: github
lang repo: node
error: 401 not authorized
steps: import curl below in postman:

curl --location --request POST 'https://sonarcloud.io/api/projects/create' \
--header 'Accept: application/json' \
--header 'Accept-Language: en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: <token-sonarcloud-encoded-base64>' \
--data-urlencode 'project=teste-teste-teste2' \
--data-urlencode 'name=teste-teste-teste' \
--data-urlencode 'organization=myorg'

return: 403

    "errors": [
            "msg": "Insufficient privileges"

I am a admin user my account in sonarcloud.

I suspect you need extended permissions on Github. Did you try creating a project via the SonarCloud web UI?

the sonarqube documentation help me.

The authorization use a bearer type.

Web API (sonarqube.org)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.