Forum Discussion

PerBonomi's avatar
11 years ago

Let user read a profile field

Hi there. I'd like to use, what I think is a token(?) to let users read a certain profile field of mine.

 

I.e.: /restapi/vc/users/login/pmbonomi/profiles/name/misc

 

Right now only I (because it's my account) and admins can read that field and I need to make it more accessible. I've never worked with tokens before.

 

Help? :)

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)

    Hi PerBonomi 

     

    I am assuming you are trying to make the call from outside the Lithium Platform. if you need to make a call on behalf of the currently logged in user, you can either use the username and password (which means that you need to ask them to the user first), or the lithium SSO token. This is described in here. Once you have authenticated, the API will return a session key that can be used in further authenticated calls. As the key can expire, you may need to renew it by authenticating again later on.

     

    I hope you'll find this useful!

    • PerBonomi's avatar
      PerBonomi
      Boss

      Hey PaoloT, actually I'm trying to do it from within the community, but the logged in user doesn't seem to have read access for that db field.

      • VarunGrazitti's avatar
        VarunGrazitti
        Boss

        You mean to read the field and get the data from this for a user? If thats the requrement, make the call as restadmin("/users/login/pmbonomi/profiles/name/misc")