# Problem with server side scripting

**URL:** <https://community.dreamfactory.com/t/problem-with-server-side-scripting/3374>\
**Category:** Server-Side Scripting\
**Created:** [October 27, 2016, 2:47pm UTC](https://community.dreamfactory.com/t/problem-with-server-side-scripting/3374 "2016-10-27T14:47:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zamanak](https://avatars.discourse-cdn.com/v4/letter/z/8491ac/32.png) [@zamanak](https://community.dreamfactory.com/u/zamanak)\
**Post date:** [October 27, 2016, 2:47pm UTC](https://community.dreamfactory.com/t/problem-with-server-side-scripting/3374/1 "2016-10-27T14:47:00Z")

</div>

hi  
thanks for your efforts in DF  
we used a server side script and have made following configurations:

- Created a role named “Public”;
- it is active and has access to all services (just for test)
- Created an App named “Public\_API” and set it’s default role to “Public”  
\*We use only API KEY for call this script
- We also configured CORS to allow all origins

Our problem is that we cant access to internal API’s such as ‘/mysql/\_table/table\_name’ and we get following error when we call our Script:

* * *

## Invalid token: Wrong number of segments",“code”:401

please note that we checked API key and it was correct.  
any one got any idea what we are missing?

---

<div class="post-metadata">

**Author:** ![zerox12](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@zerox12](https://community.dreamfactory.com/u/zerox12)\
**Post date:** [November 2, 2016, 4:00am UTC](https://community.dreamfactory.com/t/problem-with-server-side-scripting/3374/2 "2016-11-02T04:00:53Z")

</div>

What language are you scripting in? What does the script do?

---

<div class="post-metadata">

**Author:** ![rbarriuso](https://avatars.discourse-cdn.com/v4/letter/r/e99b99/32.png) [@rbarriuso](https://community.dreamfactory.com/u/rbarriuso)\
**Post date:** [December 29, 2016, 3:46pm UTC](https://community.dreamfactory.com/t/problem-with-server-side-scripting/3374/3 "2016-12-29T15:46:13Z")

</div>

It seems your auth token is not valid. It doesn’t even have the required format (JWT). How are you performing the authentication and sending the auth token?
