-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get refresh token #3
Comments
@daigotanaka would appreciate your help |
Hi @royt-via Thanks for trying out PyPardotSF! If not, let me know which step in the updated instruction you got stuck. Thanks, |
hi @daigotanaka , |
Hi @royt-via The refresh token by default is valid until you invalidate it on Salesforce. The access token should be refreshed automatically by PyPardotSF using the valid refresh token. I wonder if your Connected App has all the permission as you'd be instructed to check when you run
So PyPardotSF is working for me (ver. 3 API) and at least one other user although I just coded it not too long time ago.
|
hey @daigotanaka , |
I have both correct |
Hey @royt-via are you still having issues? I had a heck of a time getting past that error. I don't have my notes in front of me, but I think my problem was failure to populate the user_key. I have the following variables set in my call: |
Just wanted to follow up and pasting the original thread on PyPardot4 before I forget: mneedham91#46 There are a handful of people including me succeeded in authenticating with the current version of the code. My testing environment is limited to ver 3, but it seems other people made it work with version 4 as well. It would be great if anyone succeeded share their experience here. |
Now I suspect @royt-via Your refresh token may have been expired? It would not work if it is set as "Immediately expire refresh token". I'd first test with "valid until revoked", then make it more strict as needed in your situation. To go to this screen,
|
I tried to use the PyPardotSF but received an error. First i ran Salesforce authenticating using SDK:
Then I used the session_id retrieved from it as the sf_refresh_token for PardotAPI parameter.
I managed to authenticate it p.authenticate() -->>(<pypardot.client.PardotAPI object at 0x12c1e44e0>) But, when running the actual request for the query. e.g:
Received an error of: raise Exception(f"Failed to refresh token: {response}") I also try to run the steps as described in the readme file of https://github.com/anelendata/PyPardotSF/blob/master/README.md But the url i retrieved from p.setup_salesforce_auth_keys() call didn't lead to any link. |
Hi @iritg1
I'm not sure if simple-salesforce's
Yes, the only way I confirmed it to work is through obtaining the refresh_token through the interactive session of When you said
|
Thank you @daigotanaka. In the setup_salesforce_auth_keys() i used following creds: instance id: Client id & client secret: Business unit id: then "Open the following page in a browser" led to a broken path: (This site can’t be reached) |
Does your organization use "My Domain" feature that makes a custom insteand_id? If yes, I think you have to specify the instance ID as "your_custom_ID.my" (add .my). If that does not work, can you try:
Unfortunately, I cannot test this on my end. So let me know if this works... |
Yes! we are using My Domain. thank you! |
Hi @iritg1 I'm glad it worked! |
I adde '.my' to the instance_id which solved the problem |
another lesson learned: |
Hi @daigotanaka , it's been a while :) I'm still getting My organization is using "My Domain" but I'm not sure how to follow your suggestion to @iritg1 .
The only place I had to use the organization instance ID was when I was fetching the Should I try adding (btw, I shouldn't be using |
Hey @royt-via Good to hear from you again :) I don't think you need to use user_key. If you did, I'd think it's a PyPardot4 is conflicting with PyPardotSF like @iritg1 noted.
Like I noted in my original comment, I don't have the access to My Domain feature, so I'm hoping @iritg1 or someone can give you a tip here. |
I tried that but it didn't work either :/ |
I finally had an opportunity to work with an account with my domain. I confirmed that the method of obtaining refresh token with the interactive command-line tool worked. With my domain, You will need to put ".my" as in:
to
|
Followed the steps on the readme file and got to the point where I should paste a login url with
code
.Did that and nothing happened.
How should I get a refresh token? and would it be persistent or should I regenerate it?
The text was updated successfully, but these errors were encountered: