x

Access the API using the Platform API Token

I'm trying to access my store via the https://api.weeblycloud.com/ API. But the documentation states there should be an API Key and secret, however under settings I have Platform API Token with Token and Site Id. But there is no secret. I'm trying to get a list of my orders and the API documentation says I need to use my API Secret for the hmac value (X-Signed-Request-Hash). When I make a call and use the Token Id as X-Public-Key I get an error 101 saying invalid api key. At this point I don't have/want to create an app, I just want to get my orders.

4,202 Views
Message 1 of 5
Report
1 Best Answer

Best Answer

Hello @Haukman

Weebly's API is not an open API that exposes the ability to obtain a valid `access_token` using the OAuth2 ROPC flow. You must read and implement the App Authorization and Install Flow on ALL apps to obtain a valid `access_token`.

You must create an app, which must be installed to one or more Weebly site(s), and authorized by the site administrator before your app will be permitted to exchange an `authorization_code` for a valid `access_token` granting your app access to Weebly's APIs.

Weebly does not have the concept of "private apps", and all apps built for production usage are expected to operate in a multi-tenant manner. You can of course, install a development app to your own site if the site administrator uses the same account to register as a Weebly Developer, but support for those apps is limited.

To simplify setting things up on your end, you could use one of the Weebly Client Libraries available on Github.com/weebly.

View Best Answer >

4,181 Views
Message 2 of 5
Report
4 REPLIES 4

Best Answer

Hello @Haukman

Weebly's API is not an open API that exposes the ability to obtain a valid `access_token` using the OAuth2 ROPC flow. You must read and implement the App Authorization and Install Flow on ALL apps to obtain a valid `access_token`.

You must create an app, which must be installed to one or more Weebly site(s), and authorized by the site administrator before your app will be permitted to exchange an `authorization_code` for a valid `access_token` granting your app access to Weebly's APIs.

Weebly does not have the concept of "private apps", and all apps built for production usage are expected to operate in a multi-tenant manner. You can of course, install a development app to your own site if the site administrator uses the same account to register as a Weebly Developer, but support for those apps is limited.

To simplify setting things up on your end, you could use one of the Weebly Client Libraries available on Github.com/weebly.

4,182 Views
Message 2 of 5
Report

Ok, I think that answers it, the only way to get access to my store orders is to create an app, and the app has to be created under the account that created the store. It's very hard to find documentation on your site that states this. I strongly suggest you would allow private apps, it would make life so much easier, just like Shopify does for example.

4,178 Views
Message 3 of 5
Report

Yes, we have that on our backlog, but it hasn't been placed on any roadmap of which I am aware.

I will work with our documentation team to help improve that experience, thanks for the suggestion.

4,176 Views
Message 4 of 5
Report

Hello, has anyone developed this app? I'm looking for a way to get orders to my backend so I can save in SQL database and fulfill automatically. I need to get the order modifiers, produce a custom report and send automatically via email to the email adress in the order as an attachment. Would help if I can at least get the orders through API.

1,296 Views
Message 5 of 5
Report