How to update Secrets value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zkuun8
    Member
    • Dec 2024
    • 32

    How to update Secrets value

    At the moment, I store Token for API into a secrets value.
    I would like to be able to update an existing Secrets Value in order to refresh the new token.
    Code:
    record\update\"AppSecret", "xxxxxxxxxxxxxxxxx", "value", "fklsdklfdsklf")
    , when I check the UI, the value is empty.
    another question, is how to Create a new Scecrets record, and get the ID.

    thanks,
  • lazovic
    Super Moderator
    • Jan 2022
    • 851

    #2
    Hi zkuun8,

    Creating an App Secret:
    Code:
    $newAppSecret = record\create('AppSecret',
                                  'name', 'New App Secret',
                                  'value', 'new_app_secret',
                                  'description', 'Desc.');
    Getting an App Secret ID by name:
    Code:
    $id = record\findOne('AppSecret', 'createdAt', 'desc', 'name', 'New App Secret');
    Getting an App Secret value by ID:
    Code:
    $value = record\attribute('AppSecret', $id, 'value');
    Updating an App Secret value:
    Code:
    $updateValue = record\update('AppSecret', $id, 'value', 'new_app_secret_1');

    Comment

    • rinorway
      Senior Member
      • Feb 2016
      • 180

      #3
      I use secrets like this :
      Process flowcharts

      Click image for larger version

Name:	image.png
Views:	12
Size:	18.0 KB
ID:	114546

      I have not yet found a way to populate the header in such way that process owners do NOT see the token.

      I think the send HTTP Request action would benefit from having a way to do authentication. Especially when OAUTH is needed to create a JWT.

      Any suggestion?





      Comment

      • zkuun8
        Member
        • Dec 2024
        • 32

        #4
        rinorway Hi,

        This is how I use it :
        "geo" is the nameof the secrets.
        Click image for larger version

Name:	image.png
Views:	13
Size:	6.6 KB
ID:	114589

        Comment

        Working...