You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does someone have an idea why this script works from API Docs, but not from an actual API call (in my case from Android)
API_KEY='xxxxxxxxxxxxxxxxxx'payload=event.request.payloadifpayload:
if'first_name'notinpayload:
raiseValueError('User name field missing')
user_name=payload.first_nameifuser_name=='':
raiseValueError('User name field required')
response=platform.api.get('system/user?api_key='+API_KEY+'&filter=first_name%3D'+user_name)
response_string=response.read().decode('utf-8')
response_bunch=bunchify(json.loads(response_string))
ifresponse_bunch.resource:
raiseValueError('User name is not available')
From API docs it works as expected. If a first name is taken, it says "user name not available". If there are no issues the user is registered as normal.
Calling from my Android app I always get the same response if this script is active. {"error":{"context":null,"message":"resource","code":500,"trace":[....
The text was updated successfully, but these errors were encountered:
zerox1212
changed the title
Help with preprocess
[python] Help with preprocess script
Nov 23, 2016
Does someone have an idea why this script works from API Docs, but not from an actual API call (in my case from Android)
From API docs it works as expected. If a first name is taken, it says "user name not available". If there are no issues the user is registered as normal.
Calling from my Android app I always get the same response if this script is active.
{"error":{"context":null,"message":"resource","code":500,"trace":[....
The text was updated successfully, but these errors were encountered: