Sugar On-Demand: New User Creation via API

Hi,
    I am working on a client requirement that is to create new user in sugar on-demand via api.
I am trying to create user on my sandbox sugar via postman but i am getting not_authorized error. While if i do GET POST api calls to other module(Accounts,Contacts) i am getting results. 

Are there any cloud settings that need to set to enable user creation via api.

Please let me if anybody has any idea.

Regards,

Shameen

Parents
  • You need to set up an authentification call in postman to get an access token, this can be set up on the create call.

    The call should look something like:

    sugarurl/.../token

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    {
    "grant_type":"password",
    "client_id":"sugar",
    "client_secret":"",
    "username":"username",
    "password":"password"
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • i did create a token first and then used that token for further action. Same token worked for other modules but not for user creation. This is some permission issue, i need to know how can i get the access.

  • Is the auth- call setup on the create-call? or did you call it earlier and used the token?

    If you login with the user from the browser for example the token will be invalidated, could that be what's happening?

Reply
  • Is the auth- call setup on the create-call? or did you call it earlier and used the token?

    If you login with the user from the browser for example the token will be invalidated, could that be what's happening?

Children