0

I want to connect my IBM cloud function to the Trello API which requires user authentication. I can re-direct them to the authentication page but it returns a page with their token that I need to save within some type of storage in order to use it within further API calls.

I saw that with Node you could potentially save the token to localStorage, but I don't know if this would be possible with a serverless function. If not, is there any other way to save that token within the function? And possibly even keep it saved there per user.

Any input at all is greatly welcome! For some background, I am creating a Cloud Function that will be called on by a dialog within my Watson Assistant skill. So the Cloud Function wouldn't return anything specific, but would just add a specific Trello card to their personal board.

Evelyn
  • 1

1 Answers1

0

You could use Parameters - See the planning your code documentation - Step 4

to understand how you should structure your code and plan for parameters. For your case it would be useful to treat the trello credential as a parameter (defaulted to the value you want) so consumers can choose to supply other credentials (to use other trello accounts) if required.

You can also refer to Binding your parameters to figure out how parameters can be associated with your action.

Rohit Shetty
  • 341
  • 2
  • 10