Reputation: 21
I have created access token using oauth-token api for orocommerce. using that access token when i am going to call any admin api for OroCommerce it's throwing 401. Anyone can help? Any suggestions will be appreciated. 127.0.0.1 - - [03/Sep/2021:23:22:05 +0530] "GET /admin/api/customers HTTP/1.1" 401 460 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
Here is access token i'm getting from /oauth-token api. { "token_type": "Bearer", "expires_in": 3600, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJQNWI1X2hld0J5T0NUcURxaExkWjE2U19KU3l1emFOcCIsImp0aSI6IjYxZGQwYjFkZTViOTgwN2IyZTUwZjQxMGFhM2IzZTk2ZDdhZGVlODQzMzE0MjJiMDNmMTJlZmFiYmRlMDk5MzgxYTYzY2RiMzY0YjA0YzQzIiwiaWF0IjoiMTYzMDY2MTUwMC45NDM2MzAiLCJuYmYiOiIxNjMwNjYxNTAwLjk0MzYzNyIsImV4cCI6IjE2MzA2NjUxMDAuNTc0NjM1Iiwic3ViIjoic2hla2hhciIsInNjb3BlcyI6W119.FoZw3EtLrQXAJXEPhzdlnYaYyurilD0Hf6x7eLpk6rMIHA0Sii455GsASVIpzxcTdznYlsCfUY6kfwaM8IWZXwvlP-9AqTP2ssHwRWMUHArLBJZed2P_DE4fiVBtcfZAJ96IfqBgl-NvFKW9ryJpSw5LxLa8KJEJEBOP4Qa2xZpfh_LXcxkcH6OD66l30Gvxy9ZpHFtqSDR7uBi3NlRQ7erfj46LdrGzddJ1wQjI7QlxoJLKt5SpNr6Wp01uxoyQ5L5gEuLlsMI9gidOKkodaqmDrr19spwVqeO8ygiSDQEd6C08EPmqMbrrOibslYndI2Iiz7WUjbB5RJEzypyq1w", "refresh_token": "def50200b70e5a102b8922cf1716a05c5541f82a265f47c0fcc8ccf0ceb0ebbc762187c0b9475b7a1a89190e33abb5244e832fc750e72f10e8b79a768c8b817e411eaed3aa209d9fbb67004aca7dfdb626119a0e6302c77da7f373a42fada880ecd8be7a80f6c30d7230098d31b31cea3191424525a21e10a83c87a5d0b2820149578b3219c3151d3ec75665c14c6b986f53a56accb455a8bf2076916c0790cb7d808bbef8ad5525f55cd783b86478c10b1021c658bec529a96ece9bbca326aa0114c156e0bbc39a3461289ea2dea0589e6467d11c19f543a771a0d5bd9f35dd5083ca16fe975f6724fb2ef5b012be75cab744f19133bff38120563f8699598b9b610dd9ca3d1ad9b597458ff98e4465b604b2693f4265f43cc1d23d8c2db4ce1a696bbd9153d83743603696854b93ec9418f21daa5c8f2f7877c97e208d5c4f20b8ed846ef7ec44b69e67281b79fffa7504d59ffaa2fea60194303aefd845cefd6d4a01711ffe38b655735babfdac2c57d908bf38b765dd02a056c0ce966bb311cac17d84250211" }
Upvotes: 1
Views: 215
Reputation: 46
First of all, please, make sure that you can regenerate the access token with that same set of credentials (id and secret) and retry to call the required resource.
In case you got an error on token generation, please check:
In case your token was regenerated successfully but you still get the error:
In case the error still appears please provide us with more detailed request/response logs.
Upvotes: 1