2

I need a help salesforce guys,
I am trying to automate Salesforce sandbox creation, then copying the client secret and key from an app and then use those credentials for some application.
Sandbox creation and deletion is done, but I am not able to get how should I fetch client credentials. I searched internet, and I only find gui method : login, select app, select view, get credentials.
At last I wrote a shitty selenium script but I don't have faith in this approach.
If anybody can give me insight, It would be great help.

Comments
  • 0
    🚩saves this for later.

    Can't say I've thought about grabbing those keys via a script before, hell now that you've mentioned it, I can see this being a plus.

    @C0D4 needs coffee before fighting SF in the morning.
  • 1
    There's an object called

    ConnectedAppOathConfig

    but it doesn't appear to be queryable,
  • 1
    @C0D4 l looked for available APIs but I didn't find anything related to this.
    And I am not a very good selenium script writer specially python. My script is full of time.sleep() as implicit_wait didn't worked out.
    I wasted my whole day searching for an element. At the end of day I found out that, for iframe, I have to switch the window to iframe, then search.
  • 1
    @notSoCoolGuy unfortunately with the way Salesforce is with loading pages, it's pretty normal to have a waiting between page loads.

    Or in the java sdk I use until() to wait for an element to appear before reading it.

    From what I can tell, you can't fetch it from api or soql. So selenium is your best bet.
  • 1
    @C0D4 selenium it is then. Hope nobody runs git blame on that file.

    In future, I have to keep track on devRant regarding ex-employee of company did shit with selenium 😅 as I will not be here for long.
Add Comment