ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Using Token based authentication with REST API

api
rest-api

#1

Hi there,
I’m trying to create a document (for example: lead or customer) but using my own rest api
I cannot access post method without account so I need an authtentication token to create such document

I followed this link to generate a token:
Token based authtentication
but none of the Generating api key and api secret methods are working
So, is there any new modifications on the frappe token api, or where can I find it
I tried using execute method but with no success and the RPC is giving me authentication error even while signing in as an admin or even normal user with full permissions!!
and I can’t seem to find the Web method button: User -> Api Access -> Generate Keys

What am I missing here ?
and if this is no longer available, what are the alternatives?


#3

I have the very same problem. I’m mainly interested in the Web method. @ammarhararah did you find any answers?


#4

Was looking into this as well. It seems to be implemented in the develop branch, so not part of frappe v10. Should be available in v11

Also I believe the RPC method would be: /api/method/frappe.core.doctype.user.user.generate_keys?user=user_name


#5

Thank You @Kar_M,

@PiotrB, If you are not interested in updating your ERPNext version, the only option available is to use frappeClient library.


#6

I am having the same issue and my ERPNext is the latest i did bench update yesterday


#7

My version is 10.1.77 how do i update to V 11?


#9

Mainly:
bench switch-to-branch staging
but check this for the next steps:
https://discuss.erpnext.com/t/how-to-update-from-v10-to-v11/40944
You might encounter some problems you will find solved in there