I logged into the Genesys web API using a username, password, organization name, and a six-digit multi-factor authentication code. If I am using the Genesys Developer tool, can I log in with the following Python code using those username, password, organization name, and code? Or do I need to request a different grant from IT?
It seems that without VPN, it pops out error: 400 client not found. With VPN, it pops out error: rejected by remote users.
My Python code:
import os
import sys
import time
import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
print('-------------------------------------------------------------')
print('- Execute Bulk Action on recordings-')
print('-------------------------------------------------------------')
region = PureCloudPlatformClientV2.PureCloudRegionHosts[ORG_REGION]
PureCloudPlatformClientV2.configuration.host = region.get_api_host()
body = PureCloudPlatformClientV2.EdgeNetworkDiagnosticRequest() # EdgeNetworkDiagnosticRequest | request payload to get network diagnostic
body.host = "The IP or host you want to ping"
Genesys Cloud has no knowledge of or interest in your local network connections; all public-facing Genesys Cloud APIs are exposed publicly to the internet so that is all that is required. How your IT department chooses to give you access to internet resources is up to them.
Are my username and password are the Client ID and Client Secret? Can I login developer tool via Python using my existing Client ID and Client Secret, orgName, multi-factor authentication code? Or I need to request what other permissions?
My Platform API Admin does not have OAuth option. In the tutorial, there have a Admin -> OAuth to setup OAuth login access code. But I don't have OAuth Option in the Admin page.
I logged in the Genesys via username, password, org, and a Authenticator's code, Am I using SAML2-Bearer Grant for OAuth2 authentication? Is this a good method to log in with python SDK or other SDK? Should I ask for additional grants?
MaxRetryError: HTTPSConnectionPool(host='login.usw2.pure.cloud', port=443): Max retries exceeded with url: /oauth/token (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)))
No. A user has a username and password. A client credentials OAuth client has a client ID and client secret. Users must use user-based OAuth flows (anything but the client credentials flow), and client credentials must use the client credential OAuth flow.
If you don't have permissions to administer OAuth clients in your org, you will need to work with your org's administrators to get that access or to have them configure what you need for you.
That's not something I can tell you. That's something only you know by looking at the configuration of your OAuth client. Its configured type is whatever you (or someone in your org) set it as.
It depends entirely on your use case. See the link provided above for information on the different grant types and which to use when.
Given your comment about issues with your VPN from your original post and this error, I would recommend contacting your IT team about this to troubleshoot your network. There aren't any ongoing issues (see https://status.mypurecloud.com/), so an inability for a client to establish a connection is almost certainly not a problem on the Genesys Cloud side of the connection. Your IT team may be interested in these articles:
@Greg_Walters1 the SAML assertion comes from your SAML provider. Details on how you actually get it would be found in your SAML provider's integration documentation.