Android Question How can i access Rest Api?

i had try all example from forum but still not work. server always refuse my request? may i need to set Authorization Header? but how ?
 
Upvote 0
I'd say it's almost 100 percent certain that you haven't followed the documentation for woocommerce.

One great help when working with APIs is to use a proxy to investigate the actual traffic. One such tool that is popular and very userfriendly is Charles.

Other than that I have no more help to provide, so good luck.
 
Upvote 0
ResponseError. Reason: Unauthorized, Response: {"code":"woocommerce_rest_cannot_create","message":"Sorry, you are not allowed to create new posts.","data":{"status":401}}
 
Upvote 0
i have finish with windows version to access it. but i need to access it on android to. every time when i try access it response from server is {"code":"woocommerce_rest_cannot_create","message":"Sorry, you are not allowed to create new posts.","data":{"status":401}}

Please help me!!
 
Upvote 0
May i need OAuth to set Header?

But OAuth can't access in OkHttp. because OAuth still use HTTPRequest in old version, not support OKHttp
 
Upvote 0
Moved to the questions forum.

how to access Rest API with OAuth? could you help me?
i very confuse now. because my deadline is 1 month.

to access Rest Api in Woocommerce, i need OAuth because my website is using http. if using username and password in httpjob is need https.

Erel had posting OAuth (https://www.b4x.com/android/forum/threads/10764/#content) but that library support until httprequest not for okhttprequest.

Please Help me Erel,
 
Upvote 0
Back
Top