how to resolve Access denied issue in PHP?

0
Answered

I am writing php code to communicate with ShippingEasy through  ShippingEasy PHP API. I have account in ShippingEasy and have API key and Store API Key.

Please assist me how I can communicate with PHP code. I am writing code like bellow:

////////////////////////////////////////////////////////////////////////////////////

<?php

require_once("shipping_easy-php-master/lib/ShippingEasy.php");

$apiKey = "a05fb63cc358613a32922de087396200"; // Api Key
$store_apiKey = "d33d9e33e7e78d354deb637c2467cfa7"; // Store API Key
ShippingEasy::setApiKey($apiKey);

//// sample test order data array from https://gist.github.com/twmills/8711096
$order_arr = array(
"external_order_identifier" => "ABC-1004",
"ordered_at" => "2014-01-16 14:37:56 -0600",
"order_status" => "awaiting_shipment", ..... );

$order = new ShippingEasy_Order($store_apiKey , $order_array);
$order->create();

//////////////////////////////////////////////////////////////////////////////////

But the above code giving me error Access Denied. Please guide me how to get authentication with ShippingEasy. 

 

Official Comment

Hello Modasser, and thank you for posting in our community.

I believe I responded to your email you sent but I also wanted to post some information here as well.

It is possible part of your problem is related to the fact that your ShippingEasy account has not been completely registered providing access to your API credentials. Once fully registered, you can use the link below to access the API credentials specific to your account, using the instructions in the link below.

How do I access ShippingEasy's open API to build a custom integration?

You may also want to take a look at our additional API documentation for additional troubleshooting, using the links below:

 API Quick Start Guide

 Complete Ecommerce Plugin Development

Thank you and happy shipping!

Comment actions Permalink
0

Hello Sir, Thanks for your reply. I have just integrated with ShippinEasy. The issue was that I was not setting API Secret in my code.

But now I am creating order through my code and it is successfully creating in shipping but it is not sending me JSON response as mentioned in url "https://shippingeasy.readme.io/docs/creating-an-order-1" 

Comment actions Permalink
0

Hi Modasser, thank you for the update.

Are you receiving any specific error messages or error codes?

Unfortunately we are unable to provide in depth support for API integrations but if you have specific errors or questions about adding certain features, we are more than happy to check with our Product Team for possible suggestions.

Please feel free to email me back with additional details.

Thank you!

Comment actions Permalink

Add a Comment

Please sign in to leave a comment.