Top

Admin REST API Create User 406 ERROR Not Acceptable

Répondu

Commentaires

7 commentaires

  • Pascal BORSCHNECK

    Hi,

    Server's team told me "406" means JSON not validated.
    But it looks like well formed.

    Could you please try the following: for all booleans true/false, remove the surrounding "" and retry please ?

    Regards,
    Pascal

    0
    Actions pour les commentaires Permalien
  • Esben EHRENSKJOLD

    Hi Pascal,

    I tried to remove "" surrounding all true/false, but with the same result " User creation failed Not Acceptable".

    Regards,

    Esben

    0
    Actions pour les commentaires Permalien
  • Esben EHRENSKJOLD

    Good morning Pascal,

    I got it to work using the chrome extension: Restlet Client - REST API Testing.by removing parameter roles.

    Here are the error returned by the tester:

    {
    "errorCode": 400,
    "errorMsg": "Bad Request",
    "errorDetails":[
    {
    "param": "roles",
    "msg": "Invalid field roles. Expected an array containing string(s) from the following values list: [ 'superadmin',\n 'support',\n 'bp_admin',\n 'bp_finance',\n 'admin',\n 'company_support',\n 'admin_buyer',\n 'user',\n 'analytics',\n 'bot',\n 'pcg',\n 'guest',\n 'app_superadmin',\n 'app_admin',\n 'media_pillar',\n 'private_channels_admin',\n 'public_channels_admin' ]",
    "value": "user"
    }
    ],
    "errorDetailsCode": 400000
    }
     
    I also had to change the header from "Accept": "application/json" to "Content-Type": "application/json"

    I tested true/false too and they can be with or without "" both works.

    One more thing the home page of the sandbox displays the wrong number of members:

    https://web-sandbox.openrainbow.com/app/1.42.6/index.html#/main/home (shows 4 members even though I only go 2)

    Regards,

    Esben

    0
    Actions pour les commentaires Permalien
  • Pascal BORSCHNECK

    Hi,

     

    Some questions:

    1- Without the "" around booleans, you got a 400 or still a 406 ?

     

    2- I think I found the problem: doc generation with swagger.
    "roles" waits for an array of string

    Please try with 

    "roles": ["user"],

     

    3- About "home page of the sandbox displays the wrong number of members": I didn't get your problem

     

    Thanks,
    Pascal

    0
    Actions pour les commentaires Permalien
  • Pascal BORSCHNECK

    Here is an example of what is awaited:

    {
        "loginEmail": "user1@company.com",
        "password": "Password123!",
        "firstName": "Firstname",
        "lastName": "Lastname",
        "nickName": "Nickname",
        "title": "Mr.",
        "jobTitle": "Software developer",
        "emails": [
            {
                "email": "user1@company.com",
                "type": "work"
            },
            {
                "email": "user1@home.com",
                "type": "home"
            }
        ],
        "phoneNumbers": [
            {
                "number": "0390909090",
                "type": "home",
                "deviceType": "landline",
                "country": "FRA"
            },
            {
                "number": "0690909090",
                "type": "home",
                "deviceType": "mobile",
                "country": "FRA"
            }
        ],
        "country": "FRA",
        "language": "fr-FR",
        "timezone": "Europe/Paris",
        "accountType": "free",
        "roles": [
            "user",
            "admin"
        ],
        "adminType": "company_admin",
        "companyId": "569ce8c8f9336c471b98eda1",
        "isActive": true,
        "isInitialized": true,
        "visibility": "public"
    }

     

    0
    Actions pour les commentaires Permalien
  • Esben EHRENSKJOLD

    Hi,

    1. No errors - works with and without ""

    2. Thanks got it

    3.

    Home page:

    Company:

    Saw your json request sample thanks

    Regards,

    Esben

    0
    Actions pour les commentaires Permalien
  • Pascal BORSCHNECK

    Ok great for the CPaaS (SDK) part.

    We will update the online doc as soon as possible.

     

    For the UCaaS problem ("home page of the sandbox displays the wrong number of members"), I showed your problem to the Rainbow team.  They'll have a look.

    0
    Actions pour les commentaires Permalien

Vous devez vous connecter pour laisser un commentaire.

Vous n'avez pas trouvé ce que vous cherchez?

  • Contactez-nous

    Vous avez des questions? Laissez-nous un message pour obtenir plus d'informations.

    Contactez-nous
  • Demandez à la Communauté

    Vous avez besoin d'aide? Posez vos questions à la Communauté et obtenez des réponses d'autres utilisateurs Rainbow.

    Poster un message