Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Power up t.attach function giving "Uncaught Error: User lacks write permission on card."

Trello User
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2018

I'm creating a custom power up which requires me to use card buttons to attach a link to the card, however I keep getting the above error whenever I call t.attach function. I authorized the user with read and write permissions using the following url:

"https://trello.com/1/authorize?expiration=never&name=[App-name]&scope=read,write&key=[api-key]&callback_method=fragment&return_url=https%3A%2F%2F' + window.location.host + '%2Fauth-success"

 

After much debugging, I found that "t.memberCanWriteToModel('card')" returns true when the user is authorized. After the authorization window closes and the flow returns to the default app, the function returns false.

1 answer

1 accepted

0 votes
Answer accepted
Trello User
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2018

I figured it out. The page that was calling the t.attach method was loaded using window.location instead of t.popup method

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events