Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9265213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:00:52+00:00 2026-06-18T14:00:52+00:00

I have a native Rails app that uses Devise for authentication (using the token_authenticatable

  • 0

I have a native Rails app that uses Devise for authentication (using the token_authenticatable module). With an existing account I can successfully perform API calls in my native iOS app using JSON once I get a token.

I’d like to add the capability to create a new account via the iOS app, without using a browser. Does Devise only allow account creation via HTML?

I’ve looked at this post
Rails/Devise – Creating new users via json request

And tried various things via CURL, including:

$ curl -H "Content-Type: application/json" -d '{"email":"who@me.com","password":"mypass"}' -vX POST http://localhost:5000/users.json
...
* Connected to localhost (127.0.0.1) port 5000 (#0)
> POST /users.json HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:5000
> Accept: */*
> Content-Type: application/json
> Content-Length: 44
> 
* upload completely sent off: 44 out of 44 bytes
< HTTP/1.1 406 Not Acceptable 
< Content-Type: application/json; charset=utf-8
< X-Ua-Compatible: IE=Edge
< Cache-Control: no-cache
< X-Request-Id: 338234ca2a6c378426ab67d7a080d44e
< X-Runtime: 0.006427
< Server: WEBrick/1.3.1 (Ruby/1.9.3/2012-12-25)
< Date: Sat, 09 Feb 2013 23:11:19 GMT
< Content-Length: 1
< Connection: Keep-Alive
< Set-Cookie: _MyRailsApp_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTY1ZWIzMTdiYzc5ODdmMzNkOWI5MDM4NTMzYTQ0MWVkBjsAVA%3D%3D--c5871e8577987f36c614483b7a28b08fed55b7b8; path=/; HttpOnly
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:00:53+00:00Added an answer on June 18, 2026 at 2:00 pm

    enable json for devise

    config.navigational_formats = [“/“, :json]

    and add new file

    class RegistrationsController < Devise::RegistrationsController
    
      def create
    
        @user = User.create(params[:user])
        if @user.save
          render :json => {:state => {:code => 0}, :data => @user }
        else
          render :json => {:state => {:code => 1, :messages => @user.errors.full_messages} }
        end
    
      end
    end
    

    in routes:

      devise_for :users, :controllers => {:registrations => "registrations"}
    

    UPDATE

    Also json should look:

    {"user" : {"email":"who@me.com","password":"mypass"}}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rails 3 application using Devise for authentication. In addition to the
I have a native iOS app that can be called from Mobile Safari in
I have implemented web service using rails server. The server uses rails default authentication
I have a Rails app that has been running fine for months. The other
I have got a Rails app running which displays data that is generated by
I have native facebook app in development for few months and login worked on
I have a native object (C++) that has a gcroot pointer to a managed
This is probably a multi-part question. Background: we have a native (c++) library that
I have a simple rails app the displays a list of items and i
I want to have a comments section in my app that looks like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.