Tagged: Access Management, REST API
This topic has 1 reply, 2 voices, and was last updated 3 years, 11 months ago by Andy Cory.
-
AuthorPosts
-
July 12, 2018 at 2:25 am #22510
aniru2dh
ParticipantHi Team,
I am currently running AM 5.5 and DS 5.5. I have enabled user self service registration. I am trying to invoke the rest end points to perform this operation. I was able to submit the request for registration and get the token and code on the users email. When I try to submit the code and token to complete the registration it gives me an error “snapshot token is invalid”. I am following the steps as mentioned in the link https://backstage.forgerock.com/docs/am/5.5/user-self-service-guide/#chap-uss-usage
Please let me know if I am missing something here.
The steps followed:
curl \
–request POST \
–header “Content-Type: application/json” \
–data \
‘{
“input”: {
“user”: {
“username”: “DEMO”,
“givenName”: “Demo User”,
“sn”: “User”,
“mail”:”[email protected]”,
“userPassword”: “forgerock”,
“inetUserStatus”: “Active”
}
}
}’ \
https://openam.example.com:8443/openam/json/realms/root/selfservice/userRegistration?_action=submitRequirementscurl \
–request POST \
–header “Content-Type: application/json” \
–data \
‘{
“input”: {
“code”: “cf53fcb6-3bf2-44eb-a437-885296899699”
},
“token”: “eyJ0eXAiOiJKV…..QiLCJjmqrlqUfQ”
}’ https://openam.example.com:8443/openam/json/realms/root/selfservice/userRegistration\
?_action=submitRequirementsOn Execution of the above step it gives the error.
{“code”:400,”reason”:”Bad Request”,”message”:”Snapshot token is invalid”}July 12, 2018 at 10:49 am #22516Andy Cory
ParticipantThat should work… the example you’ve given is from the docs, not your real JSON payload – are you positive there isn’t simply a copy/paste error in your token/code taken from the email? Is this a dev system with only one AM instance? (Therefore one CTS store, to rule out issues replicating tokens between CTS stores.)
-Andy
-
AuthorPosts
You must be logged in to reply to this topic.