Upload API example gives error "Please provide User-Agent and API-Key!"

Hi! I’m trying to use the new upload API to upload designs. I’m using the PHP tutorial code but I can’t get it to work. I replaced the xml data with correct xml sample data and I filled in my API keys.

I however get:

Warning: curl_init() expects parameter 1 to be string, array given in /Users/cedrique/Documents/test.php on line 34

Warning: curl_setopt() expects parameter 1 to be resource, null given in /Users/cedrique/Documents/test.php on line 35

Warning: curl_setopt() expects parameter 1 to be resource, null given in /Users/cedrique/Documents/test.php on line 36

Warning: curl_setopt() expects parameter 1 to be resource, null given in /Users/cedrique/Documents/test.php on line 37

Warning: curl_exec() expects parameter 1 to be resource, null given in /Users/cedrique/Documents/test.php on line 38

Warning: curl_close() expects parameter 1 to be resource, null given in /Users/cedrique/Documents/test.php on line 40

And if I look in $result:

HTTP/1.1 403 Forbidden

Server: Varnish

Retry-After: 0

Content-Type: text/plain

Content-Length: 38

Accept-Ranges: bytes

Date: Thu, 02 May 2019 20:44:43 GMT

Via: 1.1 varnish

Connection: close

X-Served-By: cache-ams21020-AMS

X-Cache: MISS

X-Cache-Hits: 0

X-Timer: S1556829883.318190,VS0,VE0

X-Trace-Id: b19fae09fccd28e323e4e9b240af23a166bd4001

X-Application: api

Server-Timing: ERROR, fastly;desc=“Edge time”;dur=0

Timing-Allow-Origin: *

X-Robots-Tag: noindex, nofollow

Please provide User-Agent and API-Key!

Are my API keys not correct maybe?

Please review the available threads. Currently no api available for new partner area.

Samples and more detailed posts in following threads. Please see them, even the last one with a working example (pastepin) for old api.

Hi thank you for your reply. Why is the API not available to members? I want to use it to upload my designs

Is there a way to get a key? Or when will it be available?

Recently SPRD switched to a different model, long story :wink: In short, there is a new api, but its still in development and so not available yet for customers. If there are news about I’ll keep you informed or follow this thread: Design-API

Allright thank you. I’ll automate my uploads via Selenium for the time being. Hope you phase it out soon! :slight_smile: