local.ERROR: Error in API request: No record access for link operation (Team:users)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Russ
    Senior Member
    • Feb 2022
    • 455

    local.ERROR: Error in API request: No record access for link operation (Team:users)

    Hi, I tried searching, nothing came out, when I am running a post query to add/remove users from the specified team, I get this error:
    local.ERROR: Error in API request: No record access for link operation (Team:users)


    There is no option to enable such thing in the roles access, when it comes to team, there is only one option to enable read, not modify, in the field level there is no such option too


    Attached Files
  • Russ
    Senior Member
    • Feb 2022
    • 455

    #2
    Used this reference:

    Comment

    • Russ
      Senior Member
      • Feb 2022
      • 455

      #3
      Spent 50 minutes to wrap it differently and update the user instead of a team,
      local.ERROR: Error in API request: No edit access.

      Changed in database, manually /Roles to allow this API user to update any user, still the same error
      local.ERROR: Error in API request: No edit access.


      To summarize the issue, I need to link/unkink user with a team using official API (PHP library), I tried 2 different options:

      1. Update team (endpoint: Team/$id/user) got an error: No record access for link operation (Team:users)
      2. Update user (endpoint: User/$id) got an error: Error in API request: No edit access.

      If you guys know how to do both, please help me implement the first one.


      Thank you!

      Comment

      • yuri
        Member
        • Mar 2014
        • 8635

        #4
        Hi Russ,

        API Users can't have admin permissions. Changing user teams requires admin access.

        You can an admin user + basic authorization to access API.

        Or do some workaround with workflows that will perform needed actions for you.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • Russ
          Senior Member
          • Feb 2022
          • 455

          #5
          It looks like official PHP client is not supporting base authorization?

          THanks​

          Comment

          • Russ
            Senior Member
            • Feb 2022
            • 455

            #6
            Originally posted by yuri
            Hi Russ,

            API Users can't have admin permissions. Changing user teams requires admin access.

            You can an admin user + basic authorization to access API.

            Or do some workaround with workflows that will perform needed actions for you.

            Looks like it worked (basic authorization), thanks

            Here is the code I used, for the future explorers


            Comment

            Working...