Skip to main content
Question

Developer Platform: error in Code for POST Action

  • May 18, 2021
  • 1 reply
  • 213 views

Hello Support,

 

I am trying to post activity from zapier to accelo using below code, in zapier developer platform

const options = {
  url: 'https://happeningout.api.accelo.com/api/v0/activities/',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': `Bearer ${bundle.authData.access_token}`
  
  },
  
  _fields: {
    'against' : 'staff',
    'against_id' : '3',
    'body' : 'Hello World',
    'staff' : '3',
    'owner_id' : '3',
    'medium' : ‘note’


  }
 }

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = response.json;

    // You can do any parsing you need for results here before returning them

    return results;
  });


I am getting this error while trying to test this post activity

Error Msg

You need to choose a connected account or send something in the authData property.

 

Please help me to resolve this issue.

 

Thanks

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • May 18, 2021

Hi @hapening 

have you configured your authentication and gotten successful authentication responses? You can also console log with the z object.

 

I.e z.console.log(bundle.authData) to try to learn more about the object.