When modifying contacts via API, gets "Operation is not allowd"

Hi all,

When I try do modify contact's metadata with API "[PUT] /contacts/{contactId} — Update contacts by Id. "

I can modify my own contact, but I cannot modify others, even though I am admin and account owner.

 

The whole response texts are "

{

"errorDescription": "Operation is not allowed due insufficient user rights or account license limitations",
"error": "not_allowed"

}

"

BTW, I used the permanent token for calling API.

Is this due to license limitation? or is there any other settings which I have to adjust?

 

Thank you, in advance.

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
7 commentaires
Avatar
Pavel M

Hi! It looks like the reason is that you can only modify your own contact info through PUT call (this is the info from Profile). If you want to use your admin rights to modify user's firstl / last name, for instance, I'd suggest to try PUT call to /users endpoint (here).

However, please note that your permanent access token won't work, as the method requires scope amReadWriteUser, which can be only added at the OAuth2 step 1 (please see here).

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Hi, thank you for your swift help.

I have another question about this.

I'd like to update "metadata" for a user. I don't think it possible with /users endpoint. is it possible?

 

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
Avatar
Pavel M

There is no parameter listed in our documentation, however you should be able to use it just like in contacts (it's hidden), could you please check that? 

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Hello, I have similar problem. I'm trying to create a timelog for task, that assigned to me, in project, shared with team. Here is URL I use

https://www.wrike.com/oauth2/authorize?client_id=%s&redirect_uri=%s&response_type=code&scope=Default,wsReadOnly,wsReadWrite

And URL i use from docs

/api/v3/tasks/%s/timelogs

I got similar error: Operation is not allowed due insufficient user rights or account license limitations.
Why it can happen?

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
Avatar
Serge S.

Hi Serg! Thanks for your question.

In your case it is happening because Timelog and Time tracking functionality are available starting from the Business subscription plan. As I can see you're trialing the Professional version. Hence, you get an error in the response. Please let me know if you'd like to set up a Business plan trial, I'll gladly assist you here :)

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Hi 

 

Having the same issue, cannot create a timelog using the APIs on behalf of another user, though we are trialing Business Plus.

curl --location --request POST 'https://www.wrike.com/api/v4//tasks/IEAGK32HKRNVLFDA/timelogs?comment=Point%20de%20suivi%20Projet&hours=1&trackedDate=2024-11-08&onBehalfOf=KUATZDOY' \
--header 'Authorization: Bearer *****************'
{"errorDescription":"Operation is not allowed due insufficient user rights or account license limitations","error":"not_allowed"}

 

 

Any idea?

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
Hi Kristof Vasselon! 🙋🏻‍♀️
 
I see that our Support team member was able to assist you with this query. I hope that was helpful. Please let me know if you need anything else. 😊

Basudha Sakshyarika Community Team at Wrike Wrike Product Manager En savoir plus sur les fonctionalités et les meilleures pratiques grace à nos Webinaires online

Basudha Sakshyarika Wrike Team member En savoir plus sur les fonctionalités et les meilleures pratiques grace à nos Webinaires online

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Folllowing List for Post: When modifying contacts via API, gets "Operation is not allowd"
[this list is visible for admins and agents only]

Haut de la page
Didn’t find what you were looking for? Write new post