Answer the question
In order to leave comments, you need to log in
Where can I get a token from for requests to a server with a rails application if the devise authorization gem is used?
Hello. I am writing a rails application using the 'devise' gem for authorization. There was a task - it is necessary to create a certain entity in the database using a script. With the help of requests, nothing happens, because even without the authorization gem, a token was generated, without which the request did not pass, and now everything has become even more complicated.
Parameters: {"utf8"=>"✓", "authenticity_token"=>"rszhzpmYuHQ/stzGrASr1MXZMOGe8/QahdTTjgOhIzYCZ8oKKwTMdJTJUphrjNUPej9gczouWt987M0iclY4Lw==", "product"=>{"name"=>"name", "status"=>"status", "version"=>"version"}, "commit"=>"Create Product"}
Answer the question
In order to leave comments, you need to log in
Devise has nothing to do with it. This is all the line:
This task is called API. For this, just what is needed
The API can be public or private. Do you want everyone to be able to do this action? Then make it action and leave it as it is.
Is it necessary that the opportunity be limited?
Use one or another way to generate an API key
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question