• Jason is correct--you can't extend the credentials.

     

    However, you can create a replacement set of API credentials using the Identity API for this user, which accomplishes the same goal. You can do this by issuing a POST to the /api_credentials endpoint with the user whose credentials are close to expiration; the call will return API ID and Key and set the existing credentials to expire in 24 hours so that you have time to change out the credentials in your automation.

    Expand Post
    Selected as Best
  • Hello @DShah (Community Member)​ ,

     

    I checked with our engineering team and they informed me that it’s not actually possible to extend API credentials. They are generated with an expiration date, and once you get there then that’s it.

     

    Jason

    Community Support Engineer

    Expand Post
  • Jason is correct--you can't extend the credentials.

     

    However, you can create a replacement set of API credentials using the Identity API for this user, which accomplishes the same goal. You can do this by issuing a POST to the /api_credentials endpoint with the user whose credentials are close to expiration; the call will return API ID and Key and set the existing credentials to expire in 24 hours so that you have time to change out the credentials in your automation.

    Expand Post
    Selected as Best
    • ABacchi035478 (Community Member)

      Ohh cool so the existing ones expire in 24 hours? I assumed the old ones were revoked immediately. so with this you have two working credentials at the same time for that period?

      • Hi @ABacchi035478 (Community Member)​  -- yes, that's correct. It behaves the same way as in the platform, if you generate a new set of credentials before they expire the old credentials have the expiration date set to now() + 24 hours.

  • DShah (Community Member)

    Hi @Tim J (Veracode PM) (Veracode)​ :

    Thank you so much for guiding me. To use Identity API , does the user/service account need to have ADMIN rights ?? I have tried to generate API credentials with the current user account but getting 401 error code in response.

    Also POST: https://api.veracode.com/api/authn/v2/api_credentials does not take any parameters , then how does it API understand for which account to generate the credentials for?? Am i missing anythings here ?

    Any help would be appreciated. TIA.

    Expand Post
    • Hi @DShah (Community Member)​  - there is not currently a capability to extend a different user's credentials. The action has to be taken by the API account whose credentials need to be extended. (That's why the POST to api_credentials takes no parameters.)

       

      Regarding the error you got with the current user account, did you specify a JSON body type for your request? That's required even though the request body is empty. I've seen people commonly miss that.

      Expand Post
  • DShah (Community Member)

    Hi @Tim J (Veracode PM) (Veracode)​ : I am testing the API through postman in which I have provided Content-type: application/json but still gets the same 401 response. Can you please verify the Auth type required for processing of these API's ??

Topics (3)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.