Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
422 is returned from the Forms API, not as part of the authentication -- it means that the client provided some parameters that could not be processed. The response payload contains more details. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have get an error for response 422. May i know how can i resolve this?
class FormsAPI:
def init(self, key):
self.authorization_key = personal_forms_authorization_key
def getFormInformation(self, formID):
'''
Get forms details.
return: list_form details
'''
url = 'https://api.bentley.com/forms/'
print(url)
try:
params = {'id': formID
}
headers = {'Accept': 'application/vnd.bentley.itwin-platform.v1+json',
'Authorization': self.authorization_key}
response = requests.get(url, headers=headers, params=params)
print(response)
if(response.status_code == 200):
content = jsonParser(response.text)
list_FormDetails = content
return list_FormDetails
else:
return "error"
list_FormDetails = FormsAPI.getFormInformation(formID)
Beta Was this translation helpful? Give feedback.
All reactions