This topic contains 1 reply, has 2 voices, and was last updated by  Andy Cory 2 months, 2 weeks ago.

  • Author
    Posts
  • #22510
     aniru2dh 
    Participant

    Hi 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”:”demo@example.com”,
    “userPassword”: “forgerock”,
    “inetUserStatus”: “Active”
    }
    }
    }’ \
    https://openam.example.com:8443/openam/json/realms/root/selfservice/userRegistration?_action=submitRequirements

    curl \
    –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=submitRequirements

    On Execution of the above step it gives the error.
    {“code”:400,”reason”:”Bad Request”,”message”:”Snapshot token is invalid”}

    #22516
     Andy Cory 
    Participant

    That 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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

©2018 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?