Untitled Document
Results 1 to 9 of 9

Thread: Invalid security Token

  1. #1
    Hello,

    I am trying to connect to shiprush api using REST. I am able to get information and test labels using a test token in test mode. Once I change from test mode and update to the live token I get the following response.


    (
    [Message] => Invalid security token 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'. Token not found. [0013].
    [Details] => Array
    (
    )

    [CallContextId] => 4c31cd45-9292-4cff-a304-c8624470acc1
    [ComputerName] => APP4B
    )

  2. #2

    Join Date
    Apr 2004
    Posts
    16,101
    SYSOPS is offline
    This call is being made to my.shiprush.com and not our sandbox environment?

    Can you show us the last 4 characters of the token you're trying to use in your call?

    Thank you,
    SYSOPS
    Have Questions? Ask the ShipRush Knowledge Base: https://shiprush.com/kbase
    Reply With Quote

  3. #3
    Hello,
    Here is the last 4 of the token - 9e20
    What endpoint should i be using for live? It works fine in the sandbox with a test token
    Sandbox: "https://sandbox.api.my.shiprush.com/shipmentservice.svc/shipment/";
    Live: https://api.my.shiprush.com/shipment....svc/shipment/

  4. #4

    Join Date
    Apr 2004
    Posts
    16,101
    SYSOPS is offline
    Sorry...need one more bit of information. Can you tell us the email that this token is being used with? You can email that information to support at shiprush dot com

    Thank you,
    SYSOPS
    Have Questions? Ask the ShipRush Knowledge Base: https://shiprush.com/kbase
    Reply With Quote

  5. #5

    Join Date
    Apr 2004
    Posts
    16,101
    SYSOPS is offline
    That is your production token, so that's correct.

    The endpoint should be:
    https://api.my.shiprush.com/shipment....svc/shipment/...

    For shipping:
    https://api.my.shiprush.com/shipment.../shipment/ship

    Rating:
    https://api.my.shiprush.com/shipment.../shipment/rate

    What kind of call are you running where you get the invalid token message? I was able to use your token and run the cURL example for getting shipping accounts and did not get an error.

    SYSOPS
    Last edited by SYSOPS; 10-12-2017 at 07:39 AM.
    Have Questions? Ask the ShipRush Knowledge Base: https://shiprush.com/kbase
    Reply With Quote

  6. #6
    Hello,

    I am running curl as well. It worked in test mode. Below are the headers I sent. Is there anyway you can send me your sample curl request to energy2080 at gmail? I may be putting the token in the wrong place.

    $headers[] = "X-SHIPRUSH-SHIPPING-TOKEN: ".$mytoken;
    $headers[] = "X-SHIPRUSH-DEVELOPER-TOKEN: ".$mytoken;
    $headers[] = "Content-Type: application/xml";
    $headers[] = "Content-Length: ".$contentlength;
    $headers[] = "Accept-Encoding: gzip, deflate";
    $headers[] = "User-Agent: ".$this->useragent;

  7. #7

    Join Date
    Apr 2004
    Posts
    16,101
    SYSOPS is offline
    I use the cURL example for our ShipRush Web SDK.

    From a cmd prompt in the folder for our cURL example, which would be here example-transactions\cURL
    I put in the following:
    Code:
    curl -k -X POST https://api.my.shiprush.com/accountservice.svc/shippingaccounts/get -H "X-SHIPRUSH-SHIPPING-TOKEN:YOURTOKENHERE" -H "Content-Type:application/xml" -d @getshippingaccounts.req
    That returned information about your shipping account you have configured in ShipRush.

    If you do not have our cURL examples, please let me know.

    SYSOPS
    Have Questions? Ask the ShipRush Knowledge Base: https://shiprush.com/kbase
    Reply With Quote

  8. #8
    I do have your curl examples. It works fine in test mode but not in live. I am using the shipping svc endpoint to attempt to create labels
    https://api.my.shiprush.com/shipment.../shipment/ship
    Which value should i use for Carrier property?
    I removed the developer token header now I get this:
    (
    [Messages] => Array
    (
    [ShippingMessage] => Array
    (
    [Severity] => error
    [Text] => Shipping account not found and no default UPS account configured in settings.
    )

    )

    [IsSuccess] => false

  9. #9

    Join Date
    Apr 2004
    Posts
    16,101
    SYSOPS is offline
    Which value should i use for Carrier property?
    Using the above get shipping accounts call, I see this in the reponse:

    <CarrierType>13</CarrierType>

    HTH,
    SYSOPS
    Have Questions? Ask the ShipRush Knowledge Base: https://shiprush.com/kbase
    Reply With Quote

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •