I want to get admin token from Magento server on REST API with Volley
I don't know to pass a parameter to API or Authentication API
I ref from Magento Document
https://magento.redoc.ly/2.4.2-admin/tag/integrationcustomertoken https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-admin-token.html
binding.btnGetToken.setOnClickListener {
getAdminToken()
}
private fun getAdminToken() {
val queue = Volley.newRequestQueue(this)
val url = "https://myurl.com/rest/V1/integration/admin/token"
val stringRequest = StringRequest(Request.Method.GET, url,
Response.Listener<String> { response ->
.... ?
},
Response.ErrorListener { error ->
.... ?
})
queue.add(stringRequest)
}