function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jos van der HaveJos van der Have 

Trailhead Einstein intent API basic

Hi All,

Trying to create a dataset as described but keep getting an error :(
When I use cURL it keeps comming back with invalid scheme

curl -X POST -H "Authorization: Bearer -----BEGIN RSA PRIVATE KEY-----MIIEowIBAAKCAQEA...U+Li+uIvLNJoZkJhlwCLqAACXo4t/TNzwDeGsoSUmOgDjDQKBgC2+mYqJJg9tQ7cjMCQliPy7XMTDiTYN3BNEGX6C3LGLWois8Sf+IUdrB6FOE5e+Gkg9ZyvlskihVGW/Phsk4lTTuHX0xfnmqABZ60QMIkqqszvTuS7HND+0rOBbgxJc9WrHO2qHTI92GRSAH1ciQNhrzxDBOYji0CPclqm4CETi-----END RSA PRIVATE KEY-----" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "type=text-intent" -F "path=http://einstein.ai/text/case_routing_intent.csv" https://api.einstein.ai/v2/language/datasets/upload

{"message":"Invalid authentication scheme"}


Also when using Postman, the same error occurs...

User-added image

Anyone an idea what I do wrong??

Regards,
Jos
Agnès Le RouxAgnès Le Roux
Hi Jos!

The token is not the rsa private key. To get your token, you should go to https://api.einstein.ai/token.
There, you get the token to put in your command line.

Tell me if it works.