Got Payload validation error: 'Additional properties not allowed when creating a connection

I tried to test creating oidc connection following this documentation

and got following errors

{"statusCode":400,"error":"Bad Request","message":"Payload validation error: 'Additional properties not allowed: { \"strategy\": \"oidc\", \"name\": \"TEST\", \"options\": { \"type\": \"front_channel\", \"issuer\": \"https://my-idp-url.com\", \"authorization_endpoint\": \"https://my-idp-url.com/oauth/authorize\", \"token_endpoint\": \"https://my-idp-url.com/oauth/token\", \"client_id\" : \"my_client_id\",  \"client_secret\" : \"my_client_secret\", \"scopes\": \"openid profile\" } }'.","errorCode":"invalid_body"}

this is my cURL

curl --request POST \
  --url 'https://signage-dev.auth0.com/api/v2/connections' \
  --header 'authorization: Bearer <MY_TOKEN>' \
  --data '{ "strategy": "oidc", "name": "TEST", "options": { "type": "front_channel", "issuer": "https://my-idp-url.com", "authorization_endpoint": "https://my-idp-url.com/oauth/authorize", "token_endpoint": "https://my-idp-url.com/oauth/token", "client_id" : "my_client_id",  "client_secret" : "my_client_secret", "scopes": "openid profile" } }'

or even using this still got the same error

curl --request POST \
  --url 'https://signage-dev.auth0.com/api/v2/connections' \
  --header 'authorization: Bearer <MY_TOKEN>' \
  --data '{}'

Is there anything I did wrong?
Thanks for your help

Hi @gutakk,

Welcome to the Auth0 Community!

I can’t figure out what’s wrong with your cURL (scopes should be → scope, but fixing that didn’t fix the error)

Try this instead:

curl -L -X POST 'https://example.auth0.com/api/v2/connections' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer  {{ACCESS TOKEN}}' \
--data-raw '{"strategy":"oidc","options":{"scope":"openid profile email","discovery_url":"https://sample.auth0.com/.well-known/openid-configuration","type":"front_channel","authorization_endpoint":"https://sample.auth0.com/authorize","issuer":"https://sample.auth0.com/","jwks_uri":"https://sample.auth0.com/.well-known/jwks.json","userinfo_endpoint":"https://sample.auth0.com/userinfo","token_endpoint":"https://sample.auth0.com/oauth/token","client_id":"xxx"},"name":"sample-OIDC"}'

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