Not all attributes in the REST API JSON for users are documented (and can I keep the confirmation email from being sent when provisioning a user through the API)

Chris Markle's Avatar

Chris Markle

11 Dec, 2009 07:11 AM

I created a new user via the REST API ala:

curl -H "Accept: application/vnd.tender-v1+json" -H "Content-Type: application/json" \
    -u "USER:PASS" \
    -d "{'email':'[email blocked]','password':'PASS','password_confirmation':'PASS'}" \
    https://api.tenderapp.com/xxx/users

which gave back this response and sent a confirmation email (Subject: [Tender] Please activate your new account) to the newly added user:

{
"name": "cmarkle", 
"href": "https://api.tenderapp.com/aspera/users/148249", 
"updated_at": "2009-12-11T06:49:14Z", 
"trusted": false, 
"activated_at": null,
"title": null,
"enable_email_notifications": true, 
"openid_url": null, 
"use_email": false,
"external_id": "[email blocked]", 
"public_facing": true, 
"discussions_href": "https://api.tenderapp.com/aspera/users/148249/discussions{-opt|?|page,user_email}{-join|&|page,user_email}", 
"state": "user", 
"email": "[email blocked]",
"created_at": "2009-12-11T06:49:14Z"
}

Your KB article on Users via the API describes the following of these attributes:

  • name
  • email
  • title
  • public_facing
  • openid_url (readonly)
  • trusted (readonly)
  • state (readonly)
  • discussions_href (readonly)

But, besides the timestamp ones, here are other attributes that were returned for this newly created user:

  • activated_at
  • enable_email_notifications
  • use_email
  • external_id

Could you please describe what these are, and whether they are settable (i.e., not readonly) by me or not?

Also is there a way to provision the user, but not send them a confirmation email?

Thanks in advance...

  1. 1 Posted by rick on 11 Dec, 2009 08:29 PM

    rick's Avatar
    • activated_at: the date the user activated their account from the signup email.
    • enable_email_notifications: whether the user receives any email notifications.
    • use_email: not used anymore.
    • external_id: SSO external_id. More info on this coming really soon. I added some features to SSO logins, and enabled them in API calls.
  2. 2 Posted by Chris Markle on 11 Dec, 2009 11:09 PM

    Chris Markle's Avatar

    I had asked as well in this question about whether it was possible to provision a user, but not send them a confirmation email. Would some fiddling with these attributes do that?

    • activated_at: the date the user activated their account from the signup email.
    • enable_email_notifications: whether the user receives any email notifications.
  3. 3 Posted by rick on 11 Dec, 2009 11:16 PM

    rick's Avatar

    Ah yes, send a skip_activation attribute when creating the user.

    POST /users
    {"email": "[email blocked]", "skip_activation": true}
    

    Only support users can do this, of course.

    Also, you can use SSO tokens the same way you do on the website now. This is new functionality that I'm working on the docs for still.

    GET /profile?sso=UNIQUE_SSO_TOKEN
    

    That creates the user automatically, if necessary. SSO users also do not have activate either.

  4. Nicole closed this discussion on 05 Feb, 2010 07:16 PM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac